diff options
author | Thomas Haller <thaller@redhat.com> | 2023-07-25 13:50:16 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-07-25 13:58:41 (GMT) |
commit | 4dc1f4989b388439c417e7ad1d29500a454bb4a5 (patch) | |
tree | 9d79109881cfa0b76c0dc0ac8adbfdd9c16ebfe7 | |
parent | f4875c69bd079adf7d2e5cb6d13948fec29b20cc (diff) | |
download | libnl-4dc1f4989b388439c417e7ad1d29500a454bb4a5.zip libnl-4dc1f4989b388439c417e7ad1d29500a454bb4a5.tar.gz libnl-4dc1f4989b388439c417e7ad1d29500a454bb4a5.tar.bz2 |
python: fix flake8 warnings F841
./python/examples/iface.py:66:5: F841 local variable 'e' is assigned to but never used
./python/examples/iface.py:66:5: F841 local variable 'e' is assigned to but never used
./python/examples/iface.py:109:1: F841 local variable 'e' is assigned to but never used
./python/examples/wiphy.py:116:5: F841 local variable 'e' is assigned to but never used
./python/examples/wiphy.py:116:5: F841 local variable 'e' is assigned to but never used
./python/examples/wiphy.py:158:1: F841 local variable 'e' is assigned to but never used
-rw-r--r-- | python/examples/iface.py | 4 | ||||
-rw-r--r-- | python/examples/wiphy.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/python/examples/iface.py b/python/examples/iface.py index 8cc8df5..afeafff 100644 --- a/python/examples/iface.py +++ b/python/examples/iface.py @@ -63,7 +63,7 @@ def msg_handler(m, a): sys.stdout.write("\n") return nl.NL_SKIP - except Exception as e: + except Exception: (t, v, tb) = sys.exc_info() print(v.message) traceback.print_tb(tb) @@ -106,7 +106,7 @@ try: while cbd.done > 0 and not err < 0: err = nl.nl_recvmsgs(s, rx_cb) -except Exception as e: +except Exception: (t, v, tb) = sys.exc_info() print(v.message) traceback.print_tb(tb) diff --git a/python/examples/wiphy.py b/python/examples/wiphy.py index 777ac69..572e95a 100644 --- a/python/examples/wiphy.py +++ b/python/examples/wiphy.py @@ -113,7 +113,7 @@ def msg_handler(m, a): for nl_mode in ifattr: print("\t\t* %s" % nl80211.nl80211_iftype2str[nl.nla_type(nl_mode)]) return nl.NL_SKIP - except Exception as e: + except Exception: (t, v, tb) = sys.exc_info() print(v.message) traceback.print_tb(tb) @@ -155,7 +155,7 @@ try: while cbd.done > 0 and not err < 0: err = nl.nl_recvmsgs(s, rx_cb) -except Exception as e: +except Exception: (t, v, tb) = sys.exc_info() print(v.message) traceback.print_tb(tb) |