]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-9495: avoid confusing chained exception in argparse test (GH-17120)
authoralclarks <57201106+alclarks@users.noreply.github.com>
Fri, 21 Feb 2020 08:48:36 +0000 (08:48 +0000)
committerGitHub <noreply@github.com>
Fri, 21 Feb 2020 08:48:36 +0000 (10:48 +0200)
Lib/test/test_argparse.py
Misc/ACKS

index b095783a02e1e9f325a22cb83bfdfd3a89f95410..9899a53d6d197424ee1db7867900549f6cb98eab 100644 (file)
@@ -105,7 +105,8 @@ def stderr_to_parser_error(parse_args, *args, **kwargs):
             code = sys.exc_info()[1].code
             stdout = sys.stdout.getvalue()
             stderr = sys.stderr.getvalue()
-            raise ArgumentParserError("SystemExit", stdout, stderr, code)
+            raise ArgumentParserError(
+                "SystemExit", stdout, stderr, code) from None
     finally:
         sys.stdout = old_stdout
         sys.stderr = old_stderr
index b11ee9cdea67d79e9932ada9973326127e7bb9df..976c26eb9117be79f8aeddf8c67e2408df6bbac9 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -312,6 +312,7 @@ Gilles Civario
 Chris Clark
 Diana Clarke
 Laurie Clark-Michalek
+Alexander Clarkson
 Mike Clarkson
 Andrew Clegg
 Brad Clements