From: Kefu Chai Date: Mon, 1 Feb 2021 06:06:39 +0000 (+0800) Subject: pybind/mgr/crash: flake8 cleanups X-Git-Tag: v17.1.0~3077^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ad2671c17c70d92b0f04ad47696f6cec3ee224b1;p=ceph.git pybind/mgr/crash: flake8 cleanups Signed-off-by: Kefu Chai --- diff --git a/src/pybind/mgr/crash/module.py b/src/pybind/mgr/crash/module.py index d5a0c1e6b8d..d386d2529a9 100644 --- a/src/pybind/mgr/crash/module.py +++ b/src/pybind/mgr/crash/module.py @@ -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(), '' diff --git a/src/pybind/mgr/tox.ini b/src/pybind/mgr/tox.ini index d7b638d13bf..15e1b502fb8 100644 --- a/src/pybind/mgr/tox.ini +++ b/src/pybind/mgr/tox.ini @@ -89,6 +89,7 @@ deps = autopep8 modules = cephadm + crash devicehealth insights iostat