Fix (new) flake8 errors
They showed up on upgrade of flake8/pep8.
--- a/cubicweb/__init__.py Tue Nov 15 11:44:05 2016 +0100
+++ b/cubicweb/__init__.py Wed Nov 16 17:12:09 2016 +0100
@@ -157,6 +157,8 @@
def check_password(eschema, value):
return isinstance(value, (binary_type, Binary))
+
+
BASE_CHECKERS['Password'] = check_password
@@ -164,6 +166,8 @@
if isinstance(value, Binary):
return value
return binary_type(value)
+
+
BASE_CONVERTERS['Password'] = str_or_binary
@@ -224,6 +228,7 @@
else:
callback(context, *args, **kwargs)
+
CW_EVENT_MANAGER = CubicWebEventManager()
--- a/cubicweb/devtools/testlib.py Tue Nov 15 11:44:05 2016 +0100
+++ b/cubicweb/devtools/testlib.py Wed Nov 16 17:12:09 2016 +0100
@@ -208,6 +208,7 @@
def sendmail(self, fromaddr, recipients, msg):
MAILBOX.append(Email(fromaddr, recipients, msg))
+
cwconfig.SMTP = MockSMTP
--- a/cubicweb/pyramid/pyramidctl.py Tue Nov 15 11:44:05 2016 +0100
+++ b/cubicweb/pyramid/pyramidctl.py Wed Nov 16 17:12:09 2016 +0100
@@ -337,6 +337,7 @@
return 3
return 0
+
CWCTL.register(PyramidStartHandler)
--- a/cubicweb/server/repository.py Tue Nov 15 11:44:05 2016 +0100
+++ b/cubicweb/server/repository.py Wed Nov 16 17:12:09 2016 +0100
@@ -1034,4 +1034,5 @@
# only defining here to prevent pylint from complaining
info = warning = error = critical = exception = debug = lambda msg, *a, **kw: None
+
set_log_methods(Repository, getLogger('cubicweb.repository'))
--- a/cubicweb/server/session.py Tue Nov 15 11:44:05 2016 +0100
+++ b/cubicweb/server/session.py Wed Nov 16 17:12:09 2016 +0100
@@ -168,6 +168,7 @@
if self.oldwrite is not None:
self.cnx.write_security = self.oldwrite
+
HOOKS_ALLOW_ALL = object()
HOOKS_DENY_ALL = object()
DEFAULT_SECURITY = object() # evaluated to true by design
--- a/cubicweb/server/sqlutils.py Tue Nov 15 11:44:05 2016 +0100
+++ b/cubicweb/server/sqlutils.py Wed Nov 16 17:12:09 2016 +0100
@@ -457,6 +457,7 @@
# only defining here to prevent pylint from complaining
info = warning = error = critical = exception = debug = lambda msg, *a, **kw: None
+
set_log_methods(SQLAdapterMixIn, getLogger('cubicweb.sqladapter'))
@@ -559,6 +560,7 @@
import yams.constraints
yams.constraints.patch_sqlite_decimal()
+
sqlite_hooks = SQL_CONNECT_HOOKS.setdefault('sqlite', [])
sqlite_hooks.append(_init_sqlite_connection)
@@ -570,5 +572,6 @@
# rolled back
cnx.commit()
+
postgres_hooks = SQL_CONNECT_HOOKS.setdefault('postgres', [])
postgres_hooks.append(_init_postgres_connection)