summaryrefslogtreecommitdiff
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorAlan Yee <alanyee@users.noreply.github.com>2019-09-09 07:15:43 -0700
committerSteve Dower <steve.dower@python.org>2019-09-09 07:15:43 -0700
commite3c59a75279b0df4e7553d6f0031e202de434e43 (patch)
tree0d8a07890ce60dd25fb767b2a2fd6ca876e3698b /Lib/inspect.py
parent24b11b8c95e96cf9c93fb7fc253e6e96506f2d77 (diff)
downloadcpython-git-e3c59a75279b0df4e7553d6f0031e202de434e43.tar.gz
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"
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index a616f2d49b..0a57749ccd 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -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))