From f64c9de623782cd6cf66d541197ea8cbbd6fa301 Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Tue, 8 Jul 2008 08:55:04 +0000 Subject: [PATCH] Fix an error accessing the cfg Since the context is passed to LogicalUnit, rather than the cfg, we can only access the cfg as self.cfg, self.context.cfg, or context.cfg (in the constructor). cfg is not valid anymore. Reviewed-by: iustinp --- lib/cmdlib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index c33993329..0d6e655af 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -89,7 +89,7 @@ class LogicalUnit(object): raise errors.OpPrereqError("Required parameter '%s' missing" % attr_name) - if not cfg.IsCluster(): + if not self.cfg.IsCluster(): raise errors.OpPrereqError("Cluster not initialized yet," " use 'gnt-cluster init' first.") if self.REQ_MASTER: -- GitLab