From: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
This patch fixes make check-local running with pep 1.7.0. The
problem happening was:
/bin/pep8 --version
1.7.0
/bin/pep8 --filename '*.py,*.py.in' (...)
./src/wok/root.py:204:52: E711 comparison to None should be 'if cond is not
None:'
./src/wok/root.py:209:52: E711 comparison to None should be 'if cond is None:'
Signed-off-by: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
---
src/wok/root.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/wok/root.py b/src/wok/root.py
index 279ca7f..b525b53 100644
--- a/src/wok/root.py
+++ b/src/wok/root.py
@@ -201,12 +201,12 @@ class WokRoot(Root):
user_info = auth.login(username, password)
# user logged sucessfuly: reset counters
- if self.failed_logins.get(user_ip_sid) != None:
+ if self.failed_logins.get(user_ip_sid) is not None:
self.failed_logins.pop(user_ip_sid)
except cherrypy.HTTPError, e:
# store time and prevent too much tries
- if self.failed_logins.get(user_ip_sid) == None:
+ if self.failed_logins.get(user_ip_sid) is None:
self.failed_logins[user_ip_sid] = {"time": time.time(),
"ip": remote_ip,
"session_id": session_id,
--
2.9.3