From: Iustin Pop <[email protected]> Hopefully this makes stable-2.15 clean and able to pass a buildbot run. The changes should all be self-explanatory, except test/mocks.py one: there were more unused arguments, so I added a silence for that at class level, and removed the '_' on _ec_id since it was superfluous now.
Signed-off-by: Iustin Pop <[email protected]> --- lib/cli.py | 3 ++- lib/cmdlib/cluster/verify.py | 6 +++--- lib/rapi/rlib2.py | 1 + src/Ganeti/Objects/Disk.hs | 2 +- test/py/mocks.py | 12 ++++++++---- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/cli.py b/lib/cli.py index a470ffa..362f2ae 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -747,7 +747,7 @@ def GenericPollJob(job_id, cbs, report_cbs, cancel_fn=None, timer += constants.CLI_WFJC_FREQUENCY else: result = cbs.WaitForJobChangeOnce(job_id, ["status"], prev_job_info, - prev_logmsg_serial, timeout=update_freq) + prev_logmsg_serial, timeout=update_freq) if not result: # job not found, go away! raise errors.JobLost("Job with id %s lost" % job_id) @@ -906,6 +906,7 @@ class _LuxiJobPollCb(JobPollCbBase): """ return self.cl.CancelJob(job_id) + class FeedbackFnJobPollReportCb(JobPollReportCbBase): def __init__(self, feedback_fn): """Initializes this class. diff --git a/lib/cmdlib/cluster/verify.py b/lib/cmdlib/cluster/verify.py index 2b1d075..5c80c18 100644 --- a/lib/cmdlib/cluster/verify.py +++ b/lib/cmdlib/cluster/verify.py @@ -109,8 +109,8 @@ class _VerifyErrors(object): @type error_descriptor: tuple (string, string, string) @param error_descriptor: triplet describing the error (object_type, code, description) - @type obj_name: string - @param obj_name: name of object (instance, node ..) the error relates to + @type object_name: string + @param object_name: name of object (instance, node ..) the error relates to @type message_list: list of strings @param message_list: body of error messages @type log_type: string @@ -133,7 +133,7 @@ class _VerifyErrors(object): log_type, error_code, object_type, object_name, msg)) else: if not object_name: - object_name = "" + object_name = "" for msg in message_list: prefixed_list.append(" - %s: %s %s: %s" % ( log_type, object_type, object_name, msg)) diff --git a/lib/rapi/rlib2.py b/lib/rapi/rlib2.py index 8916004..14c12ac 100644 --- a/lib/rapi/rlib2.py +++ b/lib/rapi/rlib2.py @@ -200,6 +200,7 @@ def _UpdateBeparams(inst): return inst + def _CheckIfConnectionDropped(sock): """Utility function to monitor the state of an open connection. diff --git a/src/Ganeti/Objects/Disk.hs b/src/Ganeti/Objects/Disk.hs index c9f498d..129cd11 100644 --- a/src/Ganeti/Objects/Disk.hs +++ b/src/Ganeti/Objects/Disk.hs @@ -81,7 +81,7 @@ instance Show LogicalVolume where showsPrec _ (LogicalVolume g v) = showString g . showString "/" . showString v --- | Check the constraints for a VG/LV names (except the @\/dev\/@ check). +-- | Check the constraints for VG\/LV names (except the @\/dev\/@ check). instance Validatable LogicalVolume where validate (LogicalVolume g v) = do let vgn = "Volume group name" diff --git a/test/py/mocks.py b/test/py/mocks.py index 406caca..b48125b 100644 --- a/test/py/mocks.py +++ b/test/py/mocks.py @@ -113,6 +113,7 @@ class FakeGLM(object): class FakeContext(object): """Fake context object""" + # pylint: disable=W0613 def __init__(self): self.cfg = FakeConfig() @@ -124,9 +125,10 @@ class FakeContext(object): def GetRpc(self, cfg): return None - def GetWConfdContext(self, _ec_id): + def GetWConfdContext(self, ec_id): return (None, None, None) + class FakeGetentResolver(object): """Fake runtime.GetentResolver""" @@ -154,6 +156,7 @@ class FakeGetentResolver(object): def LookupGid(self, gid): return "group%s" % gid + class FakeLU(object): HPATH = "fake-lu" HTYPE = None @@ -161,7 +164,7 @@ class FakeLU(object): def __init__(self, processor, op, cfg, rpc_runner, prereq_err): self.proc = processor self.cfg = cfg - self.op = op + self.op = op self.rpc = rpc_runner self.prereq_err = prereq_err @@ -170,7 +173,7 @@ class FakeLU(object): self.dont_collate_locks = dict.fromkeys(locking.LEVELS, False) self.add_locks = {} - self.LogWarning = processor.LogWarning + self.LogWarning = processor.LogWarning # pylint: disable=C0103 def CheckArguments(self): pass @@ -184,7 +187,6 @@ class FakeLU(object): def CheckPrereq(self): if self.prereq_err: raise self.prereq_err - pass def Exec(self, feedback_fn): pass @@ -196,7 +198,9 @@ class FakeLU(object): return {} def PreparePostHookNodes(self, post_hook_node_uuids): + # pylint: disable=W0613 return [] def HooksCallBack(self, phase, hook_results, feedback_fn, lu_result): + # pylint: disable=W0613 return lu_result -- 2.8.1
