]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: more linting
authorPere Diaz Bou <pdiazbou@redhat.com>
Fri, 17 Jun 2022 11:57:53 +0000 (13:57 +0200)
committerPere Diaz Bou <pdiazbou@redhat.com>
Fri, 9 Sep 2022 17:30:24 +0000 (19:30 +0200)
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
(cherry picked from commit 27f40514ebc87a05144989be9aa1abb700f49566)
(cherry picked from commit e42e70ff7fb04aec88654dfa4a36b611d46929dd)

Resolves: rhbz#2125432

src/pybind/mgr/dashboard/controllers/rbd.py

index 2f3b74bfcfe93ba56a881e6f306d5124e820c761..ea77e32c80ccf3e359e0f7f0f800258fbd8d5274 100644 (file)
@@ -4,10 +4,10 @@
 
 import logging
 import math
-import cherrypy
 from datetime import datetime
 from functools import partial
 
+import cherrypy
 import rbd
 
 from .. import mgr
@@ -84,7 +84,6 @@ class Rbd(RESTController):
         else:
             pools = [p['pool_name'] for p in CephService.get_pool_list('rbd')]
 
-        result = []
         images, num_total_images = RbdService.rbd_pool_list(pools, offset=offset, limit=limit)
         cherrypy.response.headers['X-Total-Count'] = num_total_images
         pool_result = {}
@@ -93,7 +92,7 @@ class Rbd(RESTController):
             if pool not in pool_result:
                 pool_result[pool] = {'value': [], 'pool_name': image['pool']}
             pool_result[pool]['value'].append(image)
-                
+
             images[i]['configuration'] = RbdConfiguration(
                 pool, image['namespace'], image['name']).list()
         return list(pool_result.values())