From 3b9e6a3042680d9e89b9425df70d8e6efc2bd724 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Wed, 30 Jul 2008 13:27:25 +0000
Subject: [PATCH] Fix some errors detected by pylint

Reviewed-by: imsnah
---
 lib/backend.py            | 3 ++-
 lib/bootstrap.py          | 4 ++--
 lib/hypervisor/hv_fake.py | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/backend.py b/lib/backend.py
index 2adbc04bf..c00d9649f 100644
--- a/lib/backend.py
+++ b/lib/backend.py
@@ -32,6 +32,7 @@ import re
 import subprocess
 import random
 import logging
+import tempfile
 
 from ganeti import errors
 from ganeti import utils
@@ -120,7 +121,7 @@ def StopMaster(stop_daemons):
   result = utils.RunCmd(["ip", "address", "del", "%s/32" % master_ip,
                          "dev", master_netdev])
   if result.failed:
-    logger.error("Can't remove the master IP, error: %s", result.output)
+    logging.error("Can't remove the master IP, error: %s", result.output)
     # but otherwise ignore the failure
 
   if stop_daemons:
diff --git a/lib/bootstrap.py b/lib/bootstrap.py
index d0e3090a7..21553e504 100644
--- a/lib/bootstrap.py
+++ b/lib/bootstrap.py
@@ -315,8 +315,8 @@ def MasterFailover():
 
   if not rpc.call_upload_file(cfg.GetNodeList(),
                               ss.KeyToFilename(ss.SS_MASTER_NODE)):
-    logger.Error("could not distribute the new simple store master file"
-                 " to the other nodes, please check.")
+    logging.error("could not distribute the new simple store master file"
+                  " to the other nodes, please check.")
 
   if not rpc.call_node_start_master(new_master, True):
     logging.error("could not start the master role on the new master"
diff --git a/lib/hypervisor/hv_fake.py b/lib/hypervisor/hv_fake.py
index 70cef2b7e..214ade444 100644
--- a/lib/hypervisor/hv_fake.py
+++ b/lib/hypervisor/hv_fake.py
@@ -198,7 +198,7 @@ class FakeHypervisor(hv_base.BaseHypervisor):
       finally:
         fh.close()
     except EnvironmentError, err:
-      raise HypervisorError("Failed to list node info: %s" % err)
+      raise errors.HypervisorError("Failed to list node info: %s" % err)
     result['cpu_total'] = cpu_total
 
     return result
-- 
GitLab