Skip to content

Commit 64a2b40

Browse files
committed
Corrected exit codes. Fixes #25.
1 parent 5dd9b8a commit 64a2b40

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

structure_threader/sanity_checks/sanity.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/python3
22

3-
# Copyright 2015 Francisco Pina Martins <[email protected]>
3+
# Copyright 2015-2016 Francisco Pina Martins <[email protected]>
44
# This file is part of structure_threader.
55
# structure_threader is free software: you can redistribute it and/or modify
66
# it under the terms of the GNU General Public License as published by
@@ -52,18 +52,18 @@ def file_checker(path, msg=None, is_file=True):
5252
"to a file.'".format(path))
5353
else:
5454
print("ERROR: {}".format(msg))
55-
raise SystemExit
55+
raise SystemExit(1)
5656
else:
5757
if os.path.isdir(path):
5858
if not msg:
5959
print("ERROR: '{}' should be the path to a file, not to a "
6060
"directory.'".format(path))
6161
else:
6262
print("ERROR: {}".format(msg))
63-
raise SystemExit
63+
raise SystemExit(1)
6464
elif not os.path.exists(path):
6565
if not msg:
6666
print("ERROR: Path '{}' does not exist".format(path))
6767
else:
6868
print("ERROR: {}".format(msg))
69-
raise SystemExit
69+
raise SystemExit(1)

0 commit comments

Comments
 (0)