Constants added by the site module like exit() "should not be used in programs"
(cherry picked from commit
e3c59a75279b0df4e7553d6f0031e202de434e43)
Co-authored-by: Alan Yee <alanyee@users.noreply.github.com>
type(exc).__name__,
exc)
print(msg, file=sys.stderr)
- exit(2)
+ sys.exit(2)
if has_attrs:
parts = attrs.split(".")
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))
--- /dev/null
+inspect.py now uses sys.exit() instead of exit()