Commit 17385bd2 authored by Andrea Spadaccini's avatar Andrea Spadaccini
Browse files

Fixes to errors/warnings raised by pylint 0.24



Running pylint 0.24.0 revealed 2 errors and 1 warning. Here is how I
fixed them:

* jqueue.py: silenced E1101
* netutils.py: rewrote the list comprehension using extend()
* watcher/__init__.py: fixed a missing format string parameter

These changes are backwards-compatible with pylint 0.21.1.
Signed-off-by: default avatarAndrea Spadaccini <spadaccio@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 21bf2e2e
......@@ -2187,7 +2187,7 @@ class JobQueue(object):
# Try to load from disk
job = self.SafeLoadJobFromDisk(job_id, True, writable=False)
assert not job.writable, "Got writable job"
assert not job.writable, "Got writable job" # pylint: disable=E1101
if job:
return job.CalcStatus()
......
......@@ -583,7 +583,7 @@ class IP6Address(IPAddress):
twoparts = address.split("::")
sep = len(twoparts[0].split(":")) + len(twoparts[1].split(":"))
parts = twoparts[0].split(":")
[parts.append("0") for _ in range(8 - sep)]
parts.extend(["0"] * (8 - sep))
parts += twoparts[1].split(":")
else:
parts = address.split(":")
......
......@@ -106,8 +106,8 @@ def RunWatcherHooks():
try:
results = utils.RunParts(hooks_dir)
except Exception: # pylint: disable=W0703
logging.exception("RunParts %s failed: %s", hooks_dir)
except Exception, err: # pylint: disable=W0703
logging.exception("RunParts %s failed: %s", hooks_dir, err)
return
for (relname, status, runresult) in results:
......
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