Commit 3b9e6a30 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix some errors detected by pylint

Reviewed-by: imsnah
parent 59f187eb
......@@ -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:
......
......@@ -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"
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment