From d7916e64585856fb309f0209a6cb97e1c4ea3e4b Mon Sep 17 00:00:00 2001 From: Ricardo Marques Date: Mon, 1 Oct 2018 10:19:05 +0100 Subject: [PATCH] mgr/dashboard: Exception.message doesn't exist on Python 3 Signed-off-by: Ricardo Marques --- src/pybind/mgr/dashboard/controllers/osd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/dashboard/controllers/osd.py b/src/pybind/mgr/dashboard/controllers/osd.py index 9b2fec16029..9dd63b261ca 100644 --- a/src/pybind/mgr/dashboard/controllers/osd.py +++ b/src/pybind/mgr/dashboard/controllers/osd.py @@ -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, }