Merge "Fix pylint E1101 and E1135 issue"
This commit is contained in:
commit
093dbc3807
@ -488,6 +488,7 @@ class StorwizeSSH(object):
|
|||||||
try:
|
try:
|
||||||
return self.run_ssh_check_created(ssh_cmd)
|
return self.run_ssh_check_created(ssh_cmd)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
# pylint: disable=E1101
|
||||||
if hasattr(ex, 'msg') and 'CMMVC6372W' in ex.msg:
|
if hasattr(ex, 'msg') and 'CMMVC6372W' in ex.msg:
|
||||||
vdisk = self.lsvdisk(name)
|
vdisk = self.lsvdisk(name)
|
||||||
if vdisk:
|
if vdisk:
|
||||||
@ -1211,6 +1212,7 @@ class StorwizeHelpers(object):
|
|||||||
multihostmap)
|
multihostmap)
|
||||||
return int(result_lun)
|
return int(result_lun)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
# pylint: disable=E1101
|
||||||
if (not multihostmap and hasattr(ex, 'msg') and
|
if (not multihostmap and hasattr(ex, 'msg') and
|
||||||
'CMMVC6071E' in ex.msg):
|
'CMMVC6071E' in ex.msg):
|
||||||
LOG.warning('storwize_svc_multihostmap_enabled is set '
|
LOG.warning('storwize_svc_multihostmap_enabled is set '
|
||||||
@ -1445,6 +1447,7 @@ class StorwizeHelpers(object):
|
|||||||
raise exception.VolumeBackendAPIException(data=ex)
|
raise exception.VolumeBackendAPIException(data=ex)
|
||||||
else:
|
else:
|
||||||
testValue = False
|
testValue = False
|
||||||
|
# pylint: disable=E1101
|
||||||
LOG.debug('Helper.'
|
LOG.debug('Helper.'
|
||||||
'_wait_for_condition: %(method_name)s '
|
'_wait_for_condition: %(method_name)s '
|
||||||
'execution failed for %(exception)s.',
|
'execution failed for %(exception)s.',
|
||||||
@ -2123,12 +2126,13 @@ class StorwizeHelpers(object):
|
|||||||
try:
|
try:
|
||||||
rc_id = self.ssh.mkrcrelationship(master, aux, system,
|
rc_id = self.ssh.mkrcrelationship(master, aux, system,
|
||||||
asyncmirror, cyclingmode)
|
asyncmirror, cyclingmode)
|
||||||
except exception.VolumeBackendAPIException as e:
|
except exception.VolumeBackendAPIException as ex:
|
||||||
rc_id = None
|
rc_id = None
|
||||||
# CMMVC5959E is the code in Stowize storage, meaning that
|
# CMMVC5959E is the code in Stowize storage, meaning that
|
||||||
# there is a relationship that already has this name on the
|
# there is a relationship that already has this name on the
|
||||||
# master cluster.
|
# master cluster.
|
||||||
if 'CMMVC5959E' not in e:
|
# pylint: disable=E1101
|
||||||
|
if hasattr(ex, 'msg') and 'CMMVC5959E' not in ex.msg:
|
||||||
# If there is no relation between the primary and the
|
# If there is no relation between the primary and the
|
||||||
# secondary back-end storage, the exception is raised.
|
# secondary back-end storage, the exception is raised.
|
||||||
raise
|
raise
|
||||||
|
Loading…
Reference in New Issue
Block a user