Skip to content

Commit 05fd721

Browse files
jnsnowkevmw
authored andcommitted
python: silence pylint raising-non-exception error
As of (at least) pylint 3.3.1, this code trips pylint up into believing we are raising something other than an Exception. We are not: the first two values may indeed be "None", but the last and final value must by definition be a SystemExit exception. Signed-off-by: John Snow <[email protected]> Message-ID: <[email protected]> Reviewed-by: Kevin Wolf <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
1 parent 4c600fd commit 05fd721

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python/scripts/mkvenv.py

+3
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,9 @@ def make_venv( # pylint: disable=too-many-arguments
379379
try:
380380
builder.create(str(env_dir))
381381
except SystemExit as exc:
382+
# pylint 3.3 bug:
383+
# pylint: disable=raising-non-exception, raise-missing-from
384+
382385
# Some versions of the venv module raise SystemExit; *nasty*!
383386
# We want the exception that prompted it. It might be a subprocess
384387
# error that has output we *really* want to see.

0 commit comments

Comments
 (0)