From dee6773080f854539256af7c2eb44d91c4868142 Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Mon, 26 Aug 2024 17:29:17 +0300 Subject: [PATCH] b/c...py: use `EXIT_SUCCESS` and `EXIT_FAILURE` --- bytebeat_compiler.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bytebeat_compiler.py b/bytebeat_compiler.py index 70a9e1a..6468f1c 100644 --- a/bytebeat_compiler.py +++ b/bytebeat_compiler.py @@ -14,6 +14,8 @@ import subprocess # Definitions BITS_PER_BYTE = 8 +EXIT_FAILURE = 1 +EXIT_SUCCESS = 0 # Paths PATHS = { @@ -289,10 +291,13 @@ if __name__ == "__main__": ] print(" ".join(command), flush=True) - if subprocess.run(command).returncode != 0: - exit(1) + if subprocess.run(command).returncode != EXIT_SUCCESS: + exit(EXIT_FAILURE) command = [OUTPUT_FILE] print(" ".join(command), flush=True) - exit(subprocess.run(command).returncode) + if subprocess.run(command).returncode != EXIT_SUCCESS: + exit(EXIT_FAILURE) + + exit(EXIT_SUCCESS)