From b62ddbe5f4ec2fbd781abd1ff7b5fb7dc0598d1e Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Tue, 15 Apr 2008 16:12:25 +0000 Subject: [PATCH] Fix two pylint uninitialized variable errors Reviewed-by: iustinp --- lib/bdev.py | 2 +- lib/cmdlib.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bdev.py b/lib/bdev.py index 8ba593022..8ae50e8fa 100644 --- a/lib/bdev.py +++ b/lib/bdev.py @@ -2280,7 +2280,7 @@ class FileStorage(BlockDev): try: f = open(dev_path, 'w') except IOError, err: - raise BlockDeviceError("Could not create '%'" % err) + raise errors.BlockDeviceError("Could not create '%'" % err) else: f.truncate(size * 1024 * 1024) f.close() diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 9d3b9a509..c21eafce7 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -3025,7 +3025,7 @@ def _CreateDisks(cfg, instance): file_storage_dir) if not result: - logger.Error("Could not connect to node '%s'" % inst.primary_node) + logger.Error("Could not connect to node '%s'" % instance.primary_node) return False if not result[0]: @@ -4396,7 +4396,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, source_node)) + (instance.name, src_node)) vgname = self.cfg.GetVGName() -- GitLab