Use flake8 if available instead of pyflakes
With flake8, we can check for more issues and ignore those who are not real issues. This allowed me to find genuine errors in: - modules/boursorama/pages/account_history.py - modules/ing/pages/login.py - weboob/tools/application/qt/qt.py I left one in weboob/tools/browser/browser.py for the time being. Some PEP8 fixes on other files.
This commit is contained in:
parent
e825a7eac0
commit
541d080c9d
18 changed files with 54 additions and 45 deletions
|
|
@ -21,7 +21,7 @@
|
|||
try:
|
||||
import sqlite3 as sqlite
|
||||
except ImportError, e:
|
||||
from pysqlite2 import dbapi2 as sqlite
|
||||
from pysqlite2 import dbapi2 as sqlite # NOQA
|
||||
|
||||
from mechanize import CookieJar, Cookie
|
||||
|
||||
|
|
@ -47,7 +47,8 @@ class FirefoxCookieJar(CookieJar):
|
|||
|
||||
def load(self):
|
||||
db = self.__connect()
|
||||
if not db: return
|
||||
if not db:
|
||||
return
|
||||
|
||||
cookies = db.execute("""SELECT host, path, name, value, expiry, lastAccessed, isSecure
|
||||
FROM moz_cookies
|
||||
|
|
@ -83,12 +84,15 @@ class FirefoxCookieJar(CookieJar):
|
|||
|
||||
def save(self):
|
||||
db = self.__connect()
|
||||
if not db: return
|
||||
if not db:
|
||||
return
|
||||
|
||||
db.execute("DELETE FROM moz_cookies WHERE host LIKE '%%%s%%'" % self.domain)
|
||||
for cookie in self:
|
||||
if cookie.secure: secure = 1
|
||||
else: secure = 0
|
||||
if cookie.secure:
|
||||
secure = 1
|
||||
else:
|
||||
secure = 0
|
||||
if cookie.expires is not None:
|
||||
expires = cookie.expires
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue