Enable Exception.message Deprecated/Removed Error
Flake8 currently ignores 'BaseException.message' removed in python3 Enable B306 for more thorough testing of code Change-Id: I9fbb01e8f61d679f4e611324efca6017c3b210e8 Story: 2004515 Task: 30076 Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
This commit is contained in:
parent
729cb2034a
commit
b178e49c43
ceph/ceph-manager/ceph-manager/ceph_manager
tools/engtools/hostdata-collectors/scripts
@ -60,7 +60,7 @@ class HandleUpgradesMixin(object):
|
||||
except IOError as e:
|
||||
raise exception.CephApiFailure(
|
||||
call="osd_set_key",
|
||||
reason=e.message)
|
||||
reason=str(e))
|
||||
else:
|
||||
if not response.ok:
|
||||
raise exception.CephSetKeyFailure(
|
||||
@ -299,7 +299,7 @@ class Monitor(HandleUpgradesMixin):
|
||||
response, fsid = self.service.ceph_api.fsid(
|
||||
body='text', timeout=30)
|
||||
except IOError as e:
|
||||
LOG.warning(_LW("ceph_api.fsid failed: %s") % str(e.message))
|
||||
LOG.warning(_LW("ceph_api.fsid failed: %s") % str(e))
|
||||
self.cluster_is_up = False
|
||||
return None
|
||||
|
||||
@ -317,7 +317,7 @@ class Monitor(HandleUpgradesMixin):
|
||||
response, body = self.service.ceph_api.health(
|
||||
body='text', timeout=30)
|
||||
except IOError as e:
|
||||
LOG.warning(_LW("ceph_api.health failed: %s") % str(e.message))
|
||||
LOG.warning(_LW("ceph_api.health failed: %s") % str(e))
|
||||
self.cluster_is_up = False
|
||||
return {'health': constants.CEPH_HEALTH_DOWN,
|
||||
'detail': 'Ceph cluster is down.'}
|
||||
|
@ -1264,7 +1264,7 @@ def createDB(influx_info, grafana_port, grafana_api_key):
|
||||
if p is not None:
|
||||
p.kill()
|
||||
except Exception as e:
|
||||
print(e.message)
|
||||
print(str(e))
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
@ -1308,7 +1308,7 @@ def deleteDB(influx_info, grafana_port, grafana_api_key):
|
||||
if p is not None:
|
||||
p.kill()
|
||||
except Exception as e:
|
||||
print(e.message)
|
||||
print(str(e))
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user