[Tarantool-patches] [PATCH luajit 13/15] test: fix E722 errors by pycodestyle
Igor Munkin
imun at tarantool.org
Thu Aug 3 10:30:38 MSK 2023
Fixed 4 occurrences of E722 ("do not use bare 'except'") error reported
by pycodestyle[1]. Since no particular exception type should be handled,
the base Exception class is chosen.
[1]: https://www.flake8rules.com/rules/E722.html
Signed-off-by: Igor Munkin <imun at tarantool.org>
---
src/luajit-gdb.py | 6 +++---
src/luajit_lldb.py | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py
index 8e786528..a0c8f24e 100644
--- a/src/luajit-gdb.py
+++ b/src/luajit-gdb.py
@@ -838,14 +838,14 @@ def init(commands):
# Try to remove the callback at first to not append duplicates to
# gdb.events.new_objfile internal list.
disconnect(load)
- except:
+ except Exception:
# Callback is not connected.
pass
try:
# Detect whether libluajit objfile is loaded.
gdb.parse_and_eval('luaJIT_setmode')
- except:
+ except Exception:
gdb.write('luajit-gdb.py initialization is postponed '
'until libluajit objfile is loaded\n')
# Add a callback to be executed when the next objfile is loaded.
@@ -856,7 +856,7 @@ def init(commands):
LJ_64 = str(gdb.parse_and_eval('IRT_PTR')) == 'IRT_P64'
LJ_FR2 = LJ_GC64 = str(gdb.parse_and_eval('IRT_PGC')) == 'IRT_P64'
LJ_DUALNUM = gdb.lookup_global_symbol('lj_lib_checknumber') is not None
- except:
+ except Exception:
gdb.write('luajit-gdb.py failed to load: '
'no debugging symbols found for libluajit\n')
return
diff --git a/src/luajit_lldb.py b/src/luajit_lldb.py
index e481cfa0..4787c62c 100644
--- a/src/luajit_lldb.py
+++ b/src/luajit_lldb.py
@@ -1096,7 +1096,7 @@ def configure(debugger):
LJ_64 = member.unsigned & 0x1f == IRT_P64
if member.name == 'IRT_PGC':
LJ_FR2 = LJ_GC64 = member.unsigned & 0x1f == IRT_P64
- except:
+ except Exception:
print('luajit_lldb.py failed to load: '
'no debugging symbols found for libluajit')
return
--
2.30.2
More information about the Tarantool-patches
mailing list