From 23828f1c209df71e4f522ec781eebf690732a3da Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Mon, 20 Oct 2008 12:50:06 +0000
Subject: [PATCH] Convert ssh.py to use the logging module

Reviewed-by: imsnah
---
 lib/ssh.py | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/lib/ssh.py b/lib/ssh.py
index 71d30eda4..b2d0cfa8d 100644
--- a/lib/ssh.py
+++ b/lib/ssh.py
@@ -26,7 +26,6 @@
 
 import os
 
-from ganeti import logger
 from ganeti import utils
 from ganeti import errors
 from ganeti import constants
@@ -161,11 +160,11 @@ class SshRunner:
 
     """
     if not os.path.isabs(filename):
-      logger.Error("file %s must be an absolute path" % (filename))
+      logging.error("File %s must be an absolute path", filename)
       return False
 
     if not os.path.isfile(filename):
-      logger.Error("file %s does not exist" % (filename))
+      logging.error("File %s does not exist", filename)
       return False
 
     command = [constants.SCP, "-q", "-p"]
@@ -176,9 +175,9 @@ class SshRunner:
     result = utils.RunCmd(command)
 
     if result.failed:
-      logger.Error("copy to node %s failed (%s) error %s,"
-                   " command was %s" %
-                   (node, result.fail_reason, result.output, result.cmd))
+      logging.error("Copy to node %s failed (%s) error %s,"
+                    " command was %s",
+                    node, result.fail_reason, result.output, result.cmd)
 
     return not result.failed
 
-- 
GitLab