mgr/dashboard: Exception.message doesn't exist on Python 3

Signed-off-by: Ricardo Marques <rimarques@suse.com>
This commit is contained in:
Ricardo Marques 2018-10-01 10:19:05 +01:00
parent 49f4614cc7
commit d7916e6458

View File

@ -65,8 +65,8 @@ class Osd(RESTController):
histogram = CephService.send_command('osd', srv_spec=svc_id,
prefix='perf histogram dump')
except SendCommandError as e:
if 'osd down' in e.message:
histogram = e.message
if 'osd down' in str(e):
histogram = str(e)
else:
raise
@ -173,7 +173,7 @@ class Osd(RESTController):
return {'safe-to-destroy': True}
except SendCommandError as e:
return {
'message': e.message,
'message': str(e),
'safe-to-destroy': False,
}