diff --git a/lib/jqueue.py b/lib/jqueue.py index 7138993f3c9e17eacd55c6e500a2956d3ba54cb9..3cf3b428762be1b26b4e509fc63fb34c2e819d33 100644 --- a/lib/jqueue.py +++ b/lib/jqueue.py @@ -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() diff --git a/lib/netutils.py b/lib/netutils.py index 7a1b6d032013409eb417592f56dfc5195c2ccff7..80c0219bc13b9a853a4520e41d90717f89b25821 100644 --- a/lib/netutils.py +++ b/lib/netutils.py @@ -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(":") diff --git a/lib/watcher/__init__.py b/lib/watcher/__init__.py index 64c3f626fabf31fd8c7976bf893975d32c5cc781..c84f3e802d3166ef1674881976d63438e4bf29f7 100644 --- a/lib/watcher/__init__.py +++ b/lib/watcher/__init__.py @@ -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: