diff options
| author | Barry Warsaw | 2016-11-29 01:28:56 +0000 |
|---|---|---|
| committer | Barry Warsaw | 2016-11-29 01:28:56 +0000 |
| commit | 6a96948af68f0558263d46ac782de8aec5b8be1f (patch) | |
| tree | c278f4d8a341aea8dfdc6b1160bee472cd39c3ec /src/mailman/utilities/interact.py | |
| parent | 88212f9d5c9a13e8e723d90a42f00d0f9b66d929 (diff) | |
| parent | b9250ebdefaae0ca98324cf42e4dd51ad550d839 (diff) | |
| download | mailman-6a96948af68f0558263d46ac782de8aec5b8be1f.tar.gz mailman-6a96948af68f0558263d46ac782de8aec5b8be1f.tar.zst mailman-6a96948af68f0558263d46ac782de8aec5b8be1f.zip | |
Diffstat (limited to 'src/mailman/utilities/interact.py')
| -rw-r--r-- | src/mailman/utilities/interact.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mailman/utilities/interact.py b/src/mailman/utilities/interact.py index fec980b80..ac1612156 100644 --- a/src/mailman/utilities/interact.py +++ b/src/mailman/utilities/interact.py @@ -22,6 +22,7 @@ import sys import code from contextlib import suppress +from inspect import signature from mailman import public @@ -67,4 +68,10 @@ def interact(upframe=True, banner=DEFAULT_BANNER, overrides=None): Python %s on %s Type "help", "copyright", "credits" or "license" for more information.''' % ( sys.version, sys.platform) - interp.interact(banner) + # Python 3.6 added an exitmsg keyword but we don't currently support + # configuring it. For consistency between Python 3.6 and earlier + # versions, suppress the exit message if possible. + kws = dict(banner=banner) + if 'exitmsg' in signature(interp.interact).parameters: + kws['exitmsg'] = '' + interp.interact(**kws) |
