]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Fix Python3 issue 24617/head
authorPatrick Nawracay <pnawracay@suse.com>
Tue, 16 Oct 2018 14:28:24 +0000 (16:28 +0200)
committerPatrick Nawracay <pnawracay@suse.com>
Wed, 17 Oct 2018 12:02:12 +0000 (14:02 +0200)
Which results in a 500 error when trying to access the `Performance
Counter` tab on the OSD list.

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
qa/tasks/mgr/dashboard/test_perf_counters.py
src/pybind/mgr/dashboard/controllers/perf_counters.py

index cd016434646ab328bd4d933123430f42e417367a..33e10e08e8116ec35de035dc51da7f86a5d0798a 100644 (file)
@@ -69,5 +69,5 @@ class PerfCountersControllerTest(DashboardTestCase):
             'detail': str,
             'traceback': str,
         })
-        self.assertEqual(self._resp.json()['detail'], 'osd.{} not found'.format(unused_id))
+        self.assertEqual(self._resp.json()['detail'], "'osd.{}' not found".format(unused_id))
         self.assertSchemaBody(schema)
index 130dc1024ad1f55a9a54816d791809407ccd9543..bfe495619ccfabec83c1676a9f87e4a574180e48 100644 (file)
@@ -17,7 +17,7 @@ class PerfCounter(RESTController):
         try:
             schema = schema_dict["{}.{}".format(self.service_type, service_id)]
         except KeyError as e:
-            raise cherrypy.HTTPError(404, "{0} not found".format(e.message))
+            raise cherrypy.HTTPError(404, "{0} not found".format(e))
         counters = []
 
         for key, value in sorted(schema.items()):