Commit 3345a2ba authored by Arkadiusz Hiler's avatar Arkadiusz Hiler

Fix new pep8 findings

Couple of small issues like old syntax for print with stderr and
comparing numbers using "is" instead of "==".
Signed-off-by: Arkadiusz Hiler's avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent 59a5b2b1
......@@ -72,7 +72,7 @@ def die(message):
def perror(message):
print >>sys.stderr, message
print(message, file=sys.stderr)
class HttpError(Exception):
......@@ -317,7 +317,7 @@ class Patchwork(object):
return self.json_cache[absolute_url]
r = requests.get(absolute_url, params=params)
if r.status_code is not 200:
if r.status_code != 200:
raise HttpError(r.status_code)
json = r.json()
......@@ -339,7 +339,7 @@ class Patchwork(object):
while absolute_url and n_items != 0:
r = requests.get(absolute_url, params=params)
if r.status_code is not 200:
if r.status_code != 200:
raise HttpError(r.status_code)
data = r.json()
......@@ -607,7 +607,7 @@ class GitPatchwork(object):
params['link'] = self.cmd.link_name
r = requests.get(mailbox_url, params=params)
if r.status_code is not 200:
if r.status_code != 200:
raise HttpError(r.status_code)
args = []
......@@ -659,7 +659,7 @@ class GitPatchwork(object):
params['link'] = self.cmd.link_name
r = requests.get(mailbox_url, params=params)
if r.status_code is not 200:
if r.status_code != 200:
raise HttpError(r.status_code)
print(r.content.decode())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment