diff options
| author | Barry Warsaw | 2016-11-25 09:05:26 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2016-11-25 09:05:26 -0500 |
| commit | ffc8ed1347121079c047ec454f94e27bf54a9d42 (patch) | |
| tree | cf966da53e70df97a4561ef3dc2b59a9e4e03436 /src/mailman/utilities/interact.py | |
| parent | 1c2337a411dd9ffb3ef90a81f81baee7929b7f21 (diff) | |
| download | mailman-ffc8ed1347121079c047ec454f94e27bf54a9d42.tar.gz mailman-ffc8ed1347121079c047ec454f94e27bf54a9d42.tar.zst mailman-ffc8ed1347121079c047ec454f94e27bf54a9d42.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) |
