This just adds a stub function that raises an assertion error; this accomplishes two things:
- silences many pylint warnings - if we ever stumble upon this, a specific assertion error is (hopefully) clearer than just a not implemented error --- lib/cmdlib.py | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index fc95613..13391e5 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -335,6 +335,14 @@ class NoHooksLU(LogicalUnit): # pylint: disable-msg=W0223 HPATH = None HTYPE = None + def BuildHooksEnv(self): + """Empty BuildHooksEnv for NoHooksLu. + + This just raises an error. + + """ + assert False, "BuildHooksEnv called for NoHooksLUs" + def _GetWantedNodes(lu, nodes): """Returns list of checked and expanded node names. -- 1.6.5.7
