From a2ed9ed2a314d9c2a5fb876a24b24ec9b3407508 Mon Sep 17 00:00:00 2001 From: Rich Chiodo Date: Fri, 7 Mar 2025 15:49:46 -0800 Subject: [PATCH] Get rid of silly raise/except clause --- tests/debugpy/server/test_cli.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/debugpy/server/test_cli.py b/tests/debugpy/server/test_cli.py index be2960d1..a098cda8 100644 --- a/tests/debugpy/server/test_cli.py +++ b/tests/debugpy/server/test_cli.py @@ -74,11 +74,7 @@ def parse(args): 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" \ No newline at end of file + assert options["target"] == "spam.py"