]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/crash: flake8 cleanups
authorKefu Chai <kchai@redhat.com>
Mon, 1 Feb 2021 06:06:39 +0000 (14:06 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 3 Feb 2021 12:50:07 +0000 (20:50 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/crash/module.py
src/pybind/mgr/tox.ini

index d5a0c1e6b8d1a96cc0b181925f25e5a3e8c8a9a5..d386d2529a9ecee16b8b83a2062c68435e4c23fa 100644 (file)
@@ -108,7 +108,7 @@ class Module(MgrModule):
                     crash.get('entity_name', 'unidentified daemon'),
                     crash.get('utsname_hostname', '(unknown)'),
                     crash.get('timestamp', 'unknown time'))
-                    for (_, crash) in recent.items()]
+                for crash in recent.values()]
             if num > 30:
                 detail = detail[0:30]
                 detail.append('and %d more' % (num - 30))
@@ -239,7 +239,7 @@ class Module(MgrModule):
             table.align['ENTITY'] = 'l'
             for c in r:
                 table.add_row([c.get('crash_id'),
-                               c.get('entity_name','unknown'),
+                               c.get('entity_name', 'unknown'),
                                '' if 'archived' in c else '*'])
             return 0, table.get_string(), ''
 
index d7b638d13bf5cb5aee9c5774951fa5fdef6d48d8..15e1b502fb89949577faf87b019d460393f497e0 100644 (file)
@@ -89,6 +89,7 @@ deps =
     autopep8
 modules =
     cephadm
+    crash
     devicehealth
     insights
     iostat