From ad2671c17c70d92b0f04ad47696f6cec3ee224b1 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 1 Feb 2021 14:06:39 +0800 Subject: [PATCH] pybind/mgr/crash: flake8 cleanups Signed-off-by: Kefu Chai --- src/pybind/mgr/crash/module.py | 4 ++-- src/pybind/mgr/tox.ini | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/crash/module.py b/src/pybind/mgr/crash/module.py index d5a0c1e6b8d1a..d386d2529a9ec 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 d7b638d13bf5c..15e1b502fb899 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 -- 2.39.5