commit:     68159035c6479e313c33dd31d19d42d3178f1235
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 10 18:25:18 2022 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sun Jul 10 18:25:18 2022 +0000
URL:        https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=68159035

equery check.py: Fix flake 8 qa for unused variable

flake8 did not correctly detect the way the variable is used.
Add an assert to eliminate the false detection.

Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

 pym/gentoolkit/equery/check.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pym/gentoolkit/equery/check.py b/pym/gentoolkit/equery/check.py
index 7e580b1..2ef881c 100644
--- a/pym/gentoolkit/equery/check.py
+++ b/pym/gentoolkit/equery/check.py
@@ -144,6 +144,7 @@ class VerifyContents:
                 obj_errs.append(err % locals())
                 return obj_errs
             except Exception as ex:
+                assert ex  # to silence unused variable ex
                 err = "Problem checking %(cfile)s: %(ex)s"
                 obj_errs.append(err % locals())
                 return obj_errs

Reply via email to