From d94a2aac7d00edbb05b3974e1e533c025a2f5128 Mon Sep 17 00:00:00 2001 From: Jip-Hop <2871973+Jip-Hop@users.noreply.github.com> Date: Wed, 7 Feb 2024 17:14:41 +0100 Subject: [PATCH] No need for try/except --- jlmkr.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jlmkr.py b/jlmkr.py index 6bb588c..c0c72d7 100755 --- a/jlmkr.py +++ b/jlmkr.py @@ -434,9 +434,7 @@ def start_jail(jail_name, check_startup_enabled=False): ) ) - try: - subprocess.run(cmd, check=True) - except subprocess.CalledProcessError: + if subprocess.run(cmd).returncode != 0: fail( dedent( f"""