Commit b459a848 authored by Andrea Spadaccini's avatar Andrea Spadaccini Committed by Iustin Pop
Browse files

DeprecationWarning fixes for pylint



In version 0.21, pylint unified all the disable-* (and enable-*)
directives to disable (resp. enable). This leads to a lot of
DeprecationWarning being emitted even if one uses the recommended
version of pylint (0.21.1, as stated in devnotes.rst).

This commit changes all the disable-msg directives to disable.
Signed-off-by: default avatarAndrea Spadaccini <spadaccio@google.com>
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 2c094917
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
""" """
# pylint: disable-msg=C0103 # pylint: disable=C0103
# [C0103] Invalid name build-bash-completion # [C0103] Invalid name build-bash-completion
import os import os
...@@ -241,7 +241,7 @@ class CompletionWriter: ...@@ -241,7 +241,7 @@ class CompletionWriter:
for opt in opts: for opt in opts:
# While documented, these variables aren't seen as public attributes by # While documented, these variables aren't seen as public attributes by
# pylint. pylint: disable-msg=W0212 # pylint. pylint: disable=W0212
opt.all_names = sorted(opt._short_opts + opt._long_opts) opt.all_names = sorted(opt._short_opts + opt._long_opts)
def _FindFirstArgument(self, sw): def _FindFirstArgument(self, sw):
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
""" """
# pylint: disable-msg=C0103 # pylint: disable=C0103
# C0103: Invalid name import-export # C0103: Invalid name import-export
import errno import errno
...@@ -353,7 +353,7 @@ def ParseOptions(): ...@@ -353,7 +353,7 @@ def ParseOptions():
@return: Arguments to program @return: Arguments to program
""" """
global options # pylint: disable-msg=W0603 global options # pylint: disable=W0603
parser = optparse.OptionParser(usage=("%%prog <status-file> {%s|%s}" % parser = optparse.OptionParser(usage=("%%prog <status-file> {%s|%s}" %
(constants.IEM_IMPORT, (constants.IEM_IMPORT,
...@@ -587,7 +587,7 @@ def main(): ...@@ -587,7 +587,7 @@ def main():
errmsg = "Exited with status %s" % (child.returncode, ) errmsg = "Exited with status %s" % (child.returncode, )
status_file.SetExitStatus(child.returncode, errmsg) status_file.SetExitStatus(child.returncode, errmsg)
except Exception, err: # pylint: disable-msg=W0703 except Exception, err: # pylint: disable=W0703
logging.exception("Unhandled error occurred") logging.exception("Unhandled error occurred")
status_file.SetExitStatus(constants.EXIT_FAILURE, status_file.SetExitStatus(constants.EXIT_FAILURE,
"Unhandled error occurred: %s" % (err, )) "Unhandled error occurred: %s" % (err, ))
......
...@@ -26,7 +26,7 @@ import asyncore ...@@ -26,7 +26,7 @@ import asyncore
import logging import logging
try: try:
# pylint: disable-msg=E0611 # pylint: disable=E0611
from pyinotify import pyinotify from pyinotify import pyinotify
except ImportError: except ImportError:
import pyinotify import pyinotify
...@@ -42,7 +42,7 @@ class AsyncNotifier(asyncore.file_dispatcher): ...@@ -42,7 +42,7 @@ class AsyncNotifier(asyncore.file_dispatcher):
"""An asyncore dispatcher for inotify events. """An asyncore dispatcher for inotify events.
""" """
# pylint: disable-msg=W0622,W0212 # pylint: disable=W0622,W0212
def __init__(self, watch_manager, default_proc_fun=None, map=None): def __init__(self, watch_manager, default_proc_fun=None, map=None):
"""Initializes this class. """Initializes this class.
...@@ -90,7 +90,7 @@ class FileEventHandlerBase(pyinotify.ProcessEvent): ...@@ -90,7 +90,7 @@ class FileEventHandlerBase(pyinotify.ProcessEvent):
@param watch_manager: inotify watch manager @param watch_manager: inotify watch manager
""" """
# pylint: disable-msg=W0231 # pylint: disable=W0231
# no need to call the parent's constructor # no need to call the parent's constructor
self.watch_manager = watch_manager self.watch_manager = watch_manager
...@@ -168,7 +168,7 @@ class SingleFileEventHandler(FileEventHandlerBase): ...@@ -168,7 +168,7 @@ class SingleFileEventHandler(FileEventHandlerBase):
if self._watch_handle is not None and self.RemoveWatch(self._watch_handle): if self._watch_handle is not None and self.RemoveWatch(self._watch_handle):
self._watch_handle = None self._watch_handle = None
# pylint: disable-msg=C0103 # pylint: disable=C0103
# this overrides a method in pyinotify.ProcessEvent # this overrides a method in pyinotify.ProcessEvent
def process_IN_IGNORED(self, event): def process_IN_IGNORED(self, event):
# Since we monitor a single file rather than the directory it resides in, # Since we monitor a single file rather than the directory it resides in,
...@@ -182,7 +182,7 @@ class SingleFileEventHandler(FileEventHandlerBase): ...@@ -182,7 +182,7 @@ class SingleFileEventHandler(FileEventHandlerBase):
self._watch_handle = None self._watch_handle = None
self._callback(False) self._callback(False)
# pylint: disable-msg=C0103 # pylint: disable=C0103
# this overrides a method in pyinotify.ProcessEvent # this overrides a method in pyinotify.ProcessEvent
def process_IN_MODIFY(self, event): def process_IN_MODIFY(self, event):
# This gets called when the monitored file is modified. Note that this # This gets called when the monitored file is modified. Note that this
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
""" """
# pylint: disable-msg=E1103 # pylint: disable=E1103
# E1103: %s %r has no %r member (but some types could not be # E1103: %s %r has no %r member (but some types could not be
# inferred), because the _TryOSFromDisk returns either (True, os_obj) # inferred), because the _TryOSFromDisk returns either (True, os_obj)
...@@ -412,7 +412,7 @@ def LeaveCluster(modify_ssh_setup): ...@@ -412,7 +412,7 @@ def LeaveCluster(modify_ssh_setup):
utils.RemoveFile(constants.CONFD_HMAC_KEY) utils.RemoveFile(constants.CONFD_HMAC_KEY)
utils.RemoveFile(constants.RAPI_CERT_FILE) utils.RemoveFile(constants.RAPI_CERT_FILE)
utils.RemoveFile(constants.NODED_CERT_FILE) utils.RemoveFile(constants.NODED_CERT_FILE)
except: # pylint: disable-msg=W0702 except: # pylint: disable=W0702
logging.exception("Error while removing cluster secrets") logging.exception("Error while removing cluster secrets")
result = utils.RunCmd([constants.DAEMON_UTIL, "stop", constants.CONFD]) result = utils.RunCmd([constants.DAEMON_UTIL, "stop", constants.CONFD])
...@@ -1340,7 +1340,7 @@ def BlockdevCreate(disk, size, owner, on_primary, info): ...@@ -1340,7 +1340,7 @@ def BlockdevCreate(disk, size, owner, on_primary, info):
""" """
# TODO: remove the obsolete "size" argument # TODO: remove the obsolete "size" argument
# pylint: disable-msg=W0613 # pylint: disable=W0613
clist = [] clist = []
if disk.children: if disk.children:
for child in disk.children: for child in disk.children:
...@@ -1352,7 +1352,7 @@ def BlockdevCreate(disk, size, owner, on_primary, info): ...@@ -1352,7 +1352,7 @@ def BlockdevCreate(disk, size, owner, on_primary, info):
# we need the children open in case the device itself has to # we need the children open in case the device itself has to
# be assembled # be assembled
try: try:
# pylint: disable-msg=E1103 # pylint: disable=E1103
crdev.Open() crdev.Open()
except errors.BlockDeviceError, err: except errors.BlockDeviceError, err:
_Fail("Can't make child '%s' read-write: %s", child, err) _Fail("Can't make child '%s' read-write: %s", child, err)
...@@ -1568,7 +1568,7 @@ def BlockdevAssemble(disk, owner, as_primary, idx): ...@@ -1568,7 +1568,7 @@ def BlockdevAssemble(disk, owner, as_primary, idx):
try: try:
result = _RecursiveAssembleBD(disk, owner, as_primary) result = _RecursiveAssembleBD(disk, owner, as_primary)
if isinstance(result, bdev.BlockDev): if isinstance(result, bdev.BlockDev):
# pylint: disable-msg=E1103 # pylint: disable=E1103
result = result.dev_path result = result.dev_path
if as_primary: if as_primary:
_SymlinkBlockDev(owner, result, idx) _SymlinkBlockDev(owner, result, idx)
...@@ -3322,7 +3322,7 @@ def PowercycleNode(hypervisor_type): ...@@ -3322,7 +3322,7 @@ def PowercycleNode(hypervisor_type):
# ensure the child is running on ram # ensure the child is running on ram
try: try:
utils.Mlockall() utils.Mlockall()
except Exception: # pylint: disable-msg=W0703 except Exception: # pylint: disable=W0703
pass pass
time.sleep(5) time.sleep(5)
hyper.PowercycleNode() hyper.PowercycleNode()
...@@ -3347,7 +3347,7 @@ class HooksRunner(object): ...@@ -3347,7 +3347,7 @@ class HooksRunner(object):
hooks_base_dir = constants.HOOKS_BASE_DIR hooks_base_dir = constants.HOOKS_BASE_DIR
# yeah, _BASE_DIR is not valid for attributes, we use it like a # yeah, _BASE_DIR is not valid for attributes, we use it like a
# constant # constant
self._BASE_DIR = hooks_base_dir # pylint: disable-msg=C0103 self._BASE_DIR = hooks_base_dir # pylint: disable=C0103
def RunHooks(self, hpath, phase, env): def RunHooks(self, hpath, phase, env):
"""Run the scripts in the hooks directory. """Run the scripts in the hooks directory.
......
...@@ -889,7 +889,7 @@ class DRBD8Status(object): ...@@ -889,7 +889,7 @@ class DRBD8Status(object):
self.est_time = None self.est_time = None
class BaseDRBD(BlockDev): # pylint: disable-msg=W0223 class BaseDRBD(BlockDev): # pylint: disable=W0223
"""Base DRBD class. """Base DRBD class.
This class contains a few bits of common functionality between the This class contains a few bits of common functionality between the
...@@ -1765,7 +1765,7 @@ class DRBD8(BaseDRBD): ...@@ -1765,7 +1765,7 @@ class DRBD8(BaseDRBD):
""" """
# TODO: Rewrite to not use a for loop just because there is 'break' # TODO: Rewrite to not use a for loop just because there is 'break'
# pylint: disable-msg=W0631 # pylint: disable=W0631
net_data = (self._lhost, self._lport, self._rhost, self._rport) net_data = (self._lhost, self._lport, self._rhost, self._rport)
for minor in (self._aminor,): for minor in (self._aminor,):
info = self._GetDevInfo(self._GetShowData(minor)) info = self._GetDevInfo(self._GetShowData(minor))
......
...@@ -242,7 +242,7 @@ def _InitFileStorage(file_storage_dir): ...@@ -242,7 +242,7 @@ def _InitFileStorage(file_storage_dir):
return file_storage_dir return file_storage_dir
def InitCluster(cluster_name, mac_prefix, # pylint: disable-msg=R0913 def InitCluster(cluster_name, mac_prefix, # pylint: disable=R0913
master_netdev, file_storage_dir, shared_file_storage_dir, master_netdev, file_storage_dir, shared_file_storage_dir,
candidate_pool_size, secondary_ip=None, vg_name=None, candidate_pool_size, secondary_ip=None, vg_name=None,
beparams=None, nicparams=None, ndparams=None, hvparams=None, beparams=None, nicparams=None, ndparams=None, hvparams=None,
......
...@@ -42,7 +42,7 @@ from ganeti import opcodes ...@@ -42,7 +42,7 @@ from ganeti import opcodes
from ganeti import ht from ganeti import ht
from ganeti import rapi from ganeti import rapi
import ganeti.rapi.rlib2 # pylint: disable-msg=W0611 import ganeti.rapi.rlib2 # pylint: disable=W0611
COMMON_PARAM_NAMES = map(compat.fst, opcodes.OpCode.OP_PARAMS) COMMON_PARAM_NAMES = map(compat.fst, opcodes.OpCode.OP_PARAMS)
...@@ -213,7 +213,7 @@ def PythonEvalRole(role, rawtext, text, lineno, inliner, ...@@ -213,7 +213,7 @@ def PythonEvalRole(role, rawtext, text, lineno, inliner,
The expression's result is included as a literal. The expression's result is included as a literal.
""" """
# pylint: disable-msg=W0102,W0613,W0142 # pylint: disable=W0102,W0613,W0142
# W0102: Dangerous default value as argument # W0102: Dangerous default value as argument
# W0142: Used * or ** magic # W0142: Used * or ** magic
# W0613: Unused argument # W0613: Unused argument
...@@ -222,7 +222,7 @@ def PythonEvalRole(role, rawtext, text, lineno, inliner, ...@@ -222,7 +222,7 @@ def PythonEvalRole(role, rawtext, text, lineno, inliner,
try: try:
result = eval(code, EVAL_NS) result = eval(code, EVAL_NS)
except Exception, err: # pylint: disable-msg=W0703 except Exception, err: # pylint: disable=W0703
msg = inliner.reporter.error("Failed to evaluate %r: %s" % (code, err), msg = inliner.reporter.error("Failed to evaluate %r: %s" % (code, err),
line=lineno) line=lineno)
return ([inliner.problematic(rawtext, rawtext, msg)], [msg]) return ([inliner.problematic(rawtext, rawtext, msg)], [msg])
......
...@@ -259,7 +259,7 @@ _PRIONAME_TO_VALUE = dict(_PRIORITY_NAMES) ...@@ -259,7 +259,7 @@ _PRIONAME_TO_VALUE = dict(_PRIORITY_NAMES)
class _Argument: class _Argument:
def __init__(self, min=0, max=None): # pylint: disable-msg=W0622 def __init__(self, min=0, max=None): # pylint: disable=W0622
self.min = min self.min = min
self.max = max self.max = max
...@@ -274,7 +274,7 @@ class ArgSuggest(_Argument): ...@@ -274,7 +274,7 @@ class ArgSuggest(_Argument):
Value can be any of the ones passed to the constructor. Value can be any of the ones passed to the constructor.
""" """
# pylint: disable-msg=W0622 # pylint: disable=W0622
def __init__(self, min=0, max=None, choices=None): def __init__(self, min=0, max=None, choices=None):
_Argument.__init__(self, min=min, max=max) _Argument.__init__(self, min=min, max=max)
self.choices = choices self.choices = choices
...@@ -462,7 +462,7 @@ def RemoveTags(opts, args): ...@@ -462,7 +462,7 @@ def RemoveTags(opts, args):
SubmitOpCode(op, opts=opts) SubmitOpCode(op, opts=opts)
def check_unit(option, opt, value): # pylint: disable-msg=W0613 def check_unit(option, opt, value): # pylint: disable=W0613
"""OptParsers custom converter for units. """OptParsers custom converter for units.
""" """
...@@ -509,7 +509,7 @@ def _SplitKeyVal(opt, data): ...@@ -509,7 +509,7 @@ def _SplitKeyVal(opt, data):
return kv_dict return kv_dict
def check_ident_key_val(option, opt, value): # pylint: disable-msg=W0613 def check_ident_key_val(option, opt, value): # pylint: disable=W0613
"""Custom parser for ident:key=val,key=val options. """Custom parser for ident:key=val,key=val options.
This will store the parsed values as a tuple (ident, {key: val}). As such, This will store the parsed values as a tuple (ident, {key: val}). As such,
...@@ -537,7 +537,7 @@ def check_ident_key_val(option, opt, value): # pylint: disable-msg=W0613 ...@@ -537,7 +537,7 @@ def check_ident_key_val(option, opt, value): # pylint: disable-msg=W0613
return retval return retval
def check_key_val(option, opt, value): # pylint: disable-msg=W0613 def check_key_val(option, opt, value): # pylint: disable=W0613
"""Custom parser class for key=val,key=val options. """Custom parser class for key=val,key=val options.
This will store the parsed values as a dict {key: val}. This will store the parsed values as a dict {key: val}.
...@@ -546,7 +546,7 @@ def check_key_val(option, opt, value): # pylint: disable-msg=W0613 ...@@ -546,7 +546,7 @@ def check_key_val(option, opt, value): # pylint: disable-msg=W0613
return _SplitKeyVal(opt, value) return _SplitKeyVal(opt, value)
def check_bool(option, opt, value): # pylint: disable-msg=W0613 def check_bool(option, opt, value): # pylint: disable=W0613
"""Custom parser for yes/no options. """Custom parser for yes/no options.
This will store the parsed value as either True or False. This will store the parsed value as either True or False.
...@@ -2363,8 +2363,8 @@ def GenerateTable(headers, fields, separator, data, ...@@ -2363,8 +2363,8 @@ def GenerateTable(headers, fields, separator, data,
if unitfields is None: if unitfields is None:
unitfields = [] unitfields = []
numfields = utils.FieldSet(*numfields) # pylint: disable-msg=W0142 numfields = utils.FieldSet(*numfields) # pylint: disable=W0142
unitfields = utils.FieldSet(*unitfields) # pylint: disable-msg=W0142 unitfields = utils.FieldSet(*unitfields) # pylint: disable=W0142
format_fields = [] format_fields = []
for field in fields: for field in fields:
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"""Backup related commands""" """Backup related commands"""
# pylint: disable-msg=W0401,W0613,W0614,C0103 # pylint: disable=W0401,W0613,W0614,C0103
# W0401: Wildcard import ganeti.cli # W0401: Wildcard import ganeti.cli
# W0613: Unused argument, since all functions follow the same API # W0613: Unused argument, since all functions follow the same API
# W0614: Unused import %s from wildcard import (since we need cli) # W0614: Unused import %s from wildcard import (since we need cli)
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"""Cluster related commands""" """Cluster related commands"""
# pylint: disable-msg=W0401,W0613,W0614,C0103 # pylint: disable=W0401,W0613,W0614,C0103
# W0401: Wildcard import ganeti.cli # W0401: Wildcard import ganeti.cli
# W0613: Unused argument, since all functions follow the same API # W0613: Unused argument, since all functions follow the same API
# W0614: Unused import %s from wildcard import (since we need cli) # W0614: Unused import %s from wildcard import (since we need cli)
...@@ -622,7 +622,7 @@ def MasterPing(opts, args): ...@@ -622,7 +622,7 @@ def MasterPing(opts, args):
cl = GetClient() cl = GetClient()
cl.QueryClusterInfo() cl.QueryClusterInfo()
return 0 return 0
except Exception: # pylint: disable-msg=W0703 except Exception: # pylint: disable=W0703
return 1 return 1
...@@ -685,14 +685,14 @@ def _RenewCrypto(new_cluster_cert, new_rapi_cert, rapi_cert_filename, ...@@ -685,14 +685,14 @@ def _RenewCrypto(new_cluster_cert, new_rapi_cert, rapi_cert_filename,
OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM,
rapi_cert_pem) rapi_cert_pem)
except Exception, err: # pylint: disable-msg=W0703 except Exception, err: # pylint: disable=W0703
ToStderr("Can't load new RAPI certificate from %s: %s" % ToStderr("Can't load new RAPI certificate from %s: %s" %
(rapi_cert_filename, str(err))) (rapi_cert_filename, str(err)))
return 1 return 1
try: try:
OpenSSL.crypto.load_privatekey(OpenSSL.crypto.FILETYPE_PEM, rapi_cert_pem) OpenSSL.crypto.load_privatekey(OpenSSL.crypto.FILETYPE_PEM, rapi_cert_pem)
except Exception, err: # pylint: disable-msg=W0703 except Exception, err: # pylint: disable=W0703
ToStderr("Can't load new RAPI private key from %s: %s" % ToStderr("Can't load new RAPI private key from %s: %s" %
(rapi_cert_filename, str(err))) (rapi_cert_filename, str(err)))
return 1 return 1
...@@ -703,7 +703,7 @@ def _RenewCrypto(new_cluster_cert, new_rapi_cert, rapi_cert_filename, ...@@ -703,7 +703,7 @@ def _RenewCrypto(new_cluster_cert, new_rapi_cert, rapi_cert_filename,
if cds_filename: if cds_filename:
try: try:
cds = utils.ReadFile(cds_filename) cds = utils.ReadFile(cds_filename)
except Exception, err: # pylint: disable-msg=W0703 except Exception, err: # pylint: disable=W0703
ToStderr("Can't load new cluster domain secret from %s: %s" % ToStderr("Can't load new cluster domain secret from %s: %s" %
(cds_filename, str(err))) (cds_filename, str(err)))
return 1 return 1
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"""Debugging commands""" """Debugging commands"""
# pylint: disable-msg=W0401,W0614,C0103 # pylint: disable=W0401,W0614,C0103
# W0401: Wildcard import ganeti.cli # W0401: Wildcard import ganeti.cli
# W0614: Unused import %s from wildcard import (since we need cli) # W0614: Unused import %s from wildcard import (since we need cli)
# C0103: Invalid name gnt-backup # C0103: Invalid name gnt-backup
...@@ -90,7 +90,7 @@ def GenericOpCodes(opts, args): ...@@ -90,7 +90,7 @@ def GenericOpCodes(opts, args):
ToStdout("Loading...") ToStdout("Loading...")
for job_idx in range(opts.rep_job): for job_idx in range(opts.rep_job):
for fname in args: for fname in args:
# pylint: disable-msg=W0142 # pylint: disable=W0142
op_data = simplejson.loads(utils.ReadFile(fname)) op_data = simplejson.loads(utils.ReadFile(fname))
op_list = [opcodes.OpCode.LoadOpCode(val) for val in op_data] op_list = [opcodes.OpCode.LoadOpCode(val) for val in op_data]
op_list = op_list * opts.rep_op op_list = op_list * opts.rep_op
...@@ -564,7 +564,7 @@ def TestJobqueue(opts, _): ...@@ -564,7 +564,7 @@ def TestJobqueue(opts, _):
return 0 return 0
def ListLocks(opts, args): # pylint: disable-msg=W0613 def ListLocks(opts, args): # pylint: disable=W0613
"""List all locks. """List all locks.
@param opts: the command line options selected by the user @param opts: the command line options selected by the user
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"""Node group related commands""" """Node group related commands"""
# pylint: disable-msg=W0401,W0614 # pylint: disable=W0401,W0614
# W0401: Wildcard import ganeti.cli # W0401: Wildcard import ganeti.cli
# W0614: Unused import %s from wildcard import (since we need cli) # W0614: Unused import %s from wildcard import (since we need cli)
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"""Instance related commands""" """Instance related commands"""
# pylint: disable-msg=W0401,W0614,C0103 # pylint: disable=W0401,W0614,C0103
# W0401: Wildcard import ganeti.cli # W0401: Wildcard import ganeti.cli
# W0614: Unused import %s from wildcard import (since we need cli) # W0614: Unused import %s from wildcard import (since we need cli)
# C0103: Invalid name gnt-instance # C0103: Invalid name gnt-instance
...@@ -87,7 +87,7 @@ def _ExpandMultiNames(mode, names, client=None): ...@@ -87,7 +87,7 @@ def _ExpandMultiNames(mode, names, client=None):
@raise errors.OpPrereqError: for invalid input parameters @raise errors.OpPrereqError: for invalid input parameters
""" """
# pylint: disable-msg=W0142 # pylint: disable=W0142
if client is None: if client is None:
client = GetClient() client = GetClient()
...@@ -322,7 +322,7 @@ def BatchCreate(opts, args): ...@@ -322,7 +322,7 @@ def BatchCreate(opts, args):
json_filename = args[0] json_filename = args[0]
try: try:
instance_data = simplejson.loads(utils.ReadFile(json_filename)) instance_data = simplejson.loads(utils.ReadFile(json_filename))
except Exception, err: # pylint: disable-msg=W0703 except Exception, err: # pylint: disable=W0703
ToStderr("Can't parse the instance definition file: %s" % str(err)) ToStderr("Can't parse the instance definition file: %s" % str(err))
return 1 return 1
...@@ -335,7 +335,7 @@ def BatchCreate(opts, args): ...@@ -335,7 +335,7 @@ def BatchCreate(opts, args):
# Iterate over the instances and do: # Iterate over the instances and do:
# * Populate the specs with default value # * Populate the specs with default value
# * Validate the instance specs # * Validate the instance specs
i_names = utils.NiceSort(instance_data.keys()) # pylint: disable-msg=E1103 i_names = utils.NiceSort(instance_data.keys()) # pylint: disable=E1103
for name in i_names: for name in i_names:
specs = instance_data[name] specs = instance_data[name]
specs = _PopulateWithDefaults(specs) specs = _PopulateWithDefaults(specs)
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"""Job related commands""" """Job related commands"""
# pylint: disable-msg=W0401,W0613,W0614,C0103 # pylint: disable=W0401,W0613,W0614,C0103
# W0401: Wildcard import ganeti.cli # W0401: Wildcard import ganeti.cli
# W0613: Unused argument, since all functions follow the same API # W0613: Unused argument, since all functions follow the same API
# W0614: Unused import %s from wildcard import (since we need cli) # W0614: Unused import %s from wildcard import (since we need cli)
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"""Node related commands""" """Node related commands"""
# pylint: disable-msg=W0401,W0613,W0614,C0103 # pylint: disable=W0401,W0613,W0614,C0103
# W0401: Wildcard import ganeti.cli # W0401: Wildcard import ganeti.cli
# W0613: Unused argument, since all functions follow the same API # W0613: Unused argument, since all functions follow the same API