From 9748fabffcc5954a326f1e95697d00615a8937b5 Mon Sep 17 00:00:00 2001 From: Daniel Flook Date: Sun, 17 Apr 2022 10:56:13 +0100 Subject: [PATCH] Use sys.exit --- src/python_minifier/__main__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/python_minifier/__main__.py b/src/python_minifier/__main__.py index 548f5245..714a20fd 100644 --- a/src/python_minifier/__main__.py +++ b/src/python_minifier/__main__.py @@ -179,16 +179,16 @@ def parse_args(): # Handle some invalid argument combinations if '-' in args.path and len(args.path) != 1: sys.stderr.write('error: multiple path arguments, reading from stdin not allowed\n') - exit(1) + sys.exit(1) if '-' in args.path and args.in_place: sys.stderr.write('error: reading from stdin, --in-place is not valid\n') - exit(1) + sys.exit(1) if len(args.path) > 1 and not args.in_place: sys.stderr.write('error: multiple path arguments, --in-place required\n') - exit(1) + sys.exit(1) if len(args.path) == 1 and os.path.isdir(args.path[0]) and not args.in_place: sys.stderr.write('error: path ' + args.path[0] + ' is a directory, --in-place required\n') - exit(1) + sys.exit(1) return args