Pylint fixes for Brick iSCSI/LVM
Fixes a few of the more straightforward pylint errors in these files. (anomalous-backslash-in-string, attribute-defined-outside-init, and bad-indentation) Change-Id: Ic131717a83fe182fe578b63eccf364d300a8989c
This commit is contained in:
parent
f02b2dc71f
commit
4545f1b99e
|
@ -427,6 +427,7 @@ class FakeIscsiHelper(object):
|
|||
|
||||
def __init__(self):
|
||||
self.tid = 1
|
||||
self._execute = None
|
||||
|
||||
def set_execute(self, execute):
|
||||
self._execute = execute
|
||||
|
@ -495,11 +496,11 @@ class LioAdm(TargetAdmin):
|
|||
command_args.extend(extra_args)
|
||||
self._execute(*command_args, run_as_root=True)
|
||||
except putils.ProcessExecutionError as e:
|
||||
LOG.error(_("Failed to create iscsi target for volume "
|
||||
"id:%s.") % vol_id)
|
||||
LOG.error("%s" % str(e))
|
||||
LOG.error(_("Failed to create iscsi target for volume "
|
||||
"id:%s.") % vol_id)
|
||||
LOG.error("%s" % str(e))
|
||||
|
||||
raise exception.ISCSITargetCreateFailed(volume_id=vol_id)
|
||||
raise exception.ISCSITargetCreateFailed(volume_id=vol_id)
|
||||
|
||||
iqn = '%s%s' % (self.iscsi_target_prefix, vol_id)
|
||||
tid = self._get_target(iqn)
|
||||
|
|
|
@ -178,7 +178,7 @@ class LVM(executor.Executor):
|
|||
# NOTE(gfidente): version is formatted as follows:
|
||||
# major.minor.patchlevel(library API version)[-customisation]
|
||||
version = version_list[2]
|
||||
version_filter = "(\d+)\.(\d+)\.(\d+).*"
|
||||
version_filter = r"(\d+)\.(\d+)\.(\d+).*"
|
||||
r = re.search(version_filter, version)
|
||||
version_tuple = tuple(map(int, r.group(1, 2, 3)))
|
||||
return version_tuple
|
||||
|
|
Loading…
Reference in New Issue