b/c...py: use EXIT_SUCCESS
and EXIT_FAILURE
This commit is contained in:
parent
e16688297f
commit
538837a780
@ -15,6 +15,8 @@ import subprocess
|
|||||||
|
|
||||||
# Definitions
|
# Definitions
|
||||||
BITS_PER_BYTE = 8
|
BITS_PER_BYTE = 8
|
||||||
|
EXIT_FAILURE = 1
|
||||||
|
EXIT_SUCCESS = 0
|
||||||
|
|
||||||
# Paths
|
# Paths
|
||||||
PATHS = {
|
PATHS = {
|
||||||
@ -384,10 +386,13 @@ if __name__ == "__main__":
|
|||||||
]
|
]
|
||||||
print(" ".join(command), flush=True)
|
print(" ".join(command), flush=True)
|
||||||
|
|
||||||
if subprocess.run(command).returncode != 0:
|
if subprocess.run(command).returncode != EXIT_SUCCESS:
|
||||||
exit(1)
|
exit(EXIT_FAILURE)
|
||||||
|
|
||||||
command = [OUTPUT_FILE]
|
command = [OUTPUT_FILE]
|
||||||
print(" ".join(command), flush=True)
|
print(" ".join(command), flush=True)
|
||||||
|
|
||||||
exit(subprocess.run(command).returncode)
|
if subprocess.run(command).returncode != EXIT_SUCCESS:
|
||||||
|
exit(EXIT_FAILURE)
|
||||||
|
|
||||||
|
exit(EXIT_SUCCESS)
|
||||||
|
Loading…
Reference in New Issue
Block a user