]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Exception.message doesn't exist on Python 3 24349/head
authorRicardo Marques <rimarques@suse.com>
Mon, 1 Oct 2018 09:19:05 +0000 (10:19 +0100)
committerRicardo Marques <rimarques@suse.com>
Mon, 1 Oct 2018 09:20:59 +0000 (10:20 +0100)
Signed-off-by: Ricardo Marques <rimarques@suse.com>
src/pybind/mgr/dashboard/controllers/osd.py

index 9b2fec16029aa627854d48d4a6b29cd32d7155b5..9dd63b261ca57a9fe0ea108668b4d6cafb9673ab 100644 (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,
             }