Skip to content

Commit 9748fab

Browse files
committed
Use sys.exit
1 parent 39a801a commit 9748fab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/python_minifier/__main__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,16 +179,16 @@ def parse_args():
179179
# Handle some invalid argument combinations
180180
if '-' in args.path and len(args.path) != 1:
181181
sys.stderr.write('error: multiple path arguments, reading from stdin not allowed\n')
182-
exit(1)
182+
sys.exit(1)
183183
if '-' in args.path and args.in_place:
184184
sys.stderr.write('error: reading from stdin, --in-place is not valid\n')
185-
exit(1)
185+
sys.exit(1)
186186
if len(args.path) > 1 and not args.in_place:
187187
sys.stderr.write('error: multiple path arguments, --in-place required\n')
188-
exit(1)
188+
sys.exit(1)
189189
if len(args.path) == 1 and os.path.isdir(args.path[0]) and not args.in_place:
190190
sys.stderr.write('error: path ' + args.path[0] + ' is a directory, --in-place required\n')
191-
exit(1)
191+
sys.exit(1)
192192

193193
return args
194194

0 commit comments

Comments
 (0)