Commit e3c59a75 authored by Alan Yee's avatar Alan Yee Committed by Steve Dower

bpo-38059: Using sys.exit() over exit() in inspect.py (GH-15666)

Constants added by the site module like exit() "should not be used in programs"
parent 24b11b8c
......@@ -3118,7 +3118,7 @@ def _main():
type(exc).__name__,
exc)
print(msg, file=sys.stderr)
exit(2)
sys.exit(2)
if has_attrs:
parts = attrs.split(".")
......@@ -3128,7 +3128,7 @@ def _main():
if module.__name__ in sys.builtin_module_names:
print("Can't get info for builtin modules.", file=sys.stderr)
exit(1)
sys.exit(1)
if args.details:
print('Target: {}'.format(target))
......
inspect.py now uses sys.exit() instead of exit()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment