Get rid of silly raise/except clause (#1865)

This commit is contained in:
Rich Chiodo 2025-03-07 16:55:50 -08:00 committed by GitHub
parent 24001704d8
commit e01e6dd8a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -74,11 +74,7 @@ def cli(pyfile):
except subprocess.CalledProcessError as exc:
log.debug("Process exited with code {0}. Output: {1!r}, Error: {2!r}",
exc.returncode, exc.output, exc.stderr)
try:
raise pickle.loads(exc.output)
except Exception as e:
log.debug("Failed to deserialize error output: {0}, Output was: {1!r}", e, exc.output)
raise
raise pickle.loads(exc.output)
except EOFError:
# We may have just been shutting down. If so, return an empty argv and options.
argv, options = [], {}
@ -243,4 +239,4 @@ def test_script_args(cli):
argv, options = cli(args)
assert argv == ["arg1", "arg2"]
assert options["target"] == "spam.py"
assert options["target"] == "spam.py"