summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAarni Koskela <akx@iki.fi>2019-01-25 16:39:23 +0200
committerAarni Koskela <akx@iki.fi>2019-01-25 16:59:10 +0200
commite08fa1f218a54126ba19f23ffa9bf9e6f5c99eca (patch)
treed4c922483c6e5e70482ff34e0ffd7359065f3704
parent4ea99189d8c561a535f08e850c13cd1cd0d30fd2 (diff)
downloadisort-e08fa1f218a54126ba19f23ffa9bf9e6f5c99eca.tar.gz
Use sys.exit(), not exit()
exit() comes from the site module and is not meant for program use
-rw-r--r--isort/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/isort/main.py b/isort/main.py
index 28e8974a..5b848c7e 100644
--- a/isort/main.py
+++ b/isort/main.py
@@ -169,7 +169,7 @@ class ISortCommand(setuptools.Command):
except IOError as e:
print("WARNING: Unable to parse file {0} due to {1}".format(python_file, e))
if wrong_sorted_files:
- exit(1)
+ sys.exit(1)
def parse_args(argv=None):
@@ -353,7 +353,7 @@ def main(argv=None):
except IOError as e:
print("WARNING: Unable to parse file {0} due to {1}".format(file_name, e))
if wrong_sorted_files:
- exit(1)
+ sys.exit(1)
num_skipped += len(skipped)
if num_skipped and not arguments.get('quiet', False):