From 7890681c2f6b35d9ed10eac27beadb0f63c931db Mon Sep 17 00:00:00 2001 From: Guido Trotter Date: Wed, 30 Apr 2008 09:23:29 +0000 Subject: [PATCH] Remove NoHooksLU.BuildHooksEnv Since NoHooksLU defines HPATH as None, BuildHooksEnv will never be called (as the LogicalUnit.BuildHooksEnv docstring correctly states). Removing the function altogether, to avoid having dead code lying around, and to make sure the non-implemented one in LogicalUnit will be called if someone mistakenly tries to call it, so it's immediately clear that something is wrong. Reviewed-by: iustinp --- lib/cmdlib.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 3776703..22a912a 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -152,14 +152,6 @@ class NoHooksLU(LogicalUnit): HPATH = None HTYPE = None - def BuildHooksEnv(self): - """Build hooks env. - - This is a no-op, since we don't run hooks. - - """ - return {}, [], [] - def _AddHostToEtcHosts(hostname): """Wrapper around utils.SetEtcHostsEntry. -- 1.7.10.4