From b4de68a97f5cb5b506ee5eb082371edf56cd3c60 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Thu, 24 Apr 2008 14:39:53 +0000 Subject: [PATCH] Style fixes for trunk This small patch fixes: - wrong indentation in two places - use of 'os' variable that hides global scope os module Reviewed-by: imsnah --- lib/cmdlib.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index d3d1ca3ee..5abc16fc7 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -1303,14 +1303,14 @@ class LUDiagnoseOS(NoHooksLU): for node_name, nr in rlist.iteritems(): if not nr: continue - for os in nr: - if os.name not in all_os: + for os_obj in nr: + if os_obj.name not in all_os: # build a list of nodes for this os containing empty lists # for each node in node_list - all_os[os.name] = {} + all_os[os_obj.name] = {} for nname in node_list: - all_os[os.name][nname] = [] - all_os[os.name][node_name].append(os) + all_os[os_obj.name][nname] = [] + all_os[os_obj.name][node_name].append(os_obj) return all_os def Exec(self, feedback_fn): @@ -3326,8 +3326,8 @@ class LUCreateInstance(LogicalUnit): self.op.file_driver) if self.op.file_storage_dir and os.path.isabs(self.op.file_storage_dir): - raise errors.OpPrereqError("File storage directory not a relative" - " path") + raise errors.OpPrereqError("File storage directory not a relative" + " path") #### allocator run if [self.op.iallocator, self.op.pnode].count(None) != 1: @@ -4499,7 +4499,7 @@ class LUExportInstance(LogicalUnit): # shutdown the instance, but not the disks if not rpc.call_instance_shutdown(src_node, instance): raise errors.OpExecError("Could not shutdown instance %s on node %s" % - (instance.name, src_node)) + (instance.name, src_node)) vgname = self.cfg.GetVGName() -- GitLab