changeset 0e0591b85c0e in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset;node=0e0591b85c0e
description:
Set interact options depending on python version
issue8257
review269281002
diffstat:
trytond/console.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (15 lines):
diff -r 9b3dd281c12b -r 0e0591b85c0e trytond/console.py
--- a/trytond/console.py Mon Apr 08 15:06:36 2019 +0200
+++ b/trytond/console.py Thu Apr 11 13:50:56 2019 +0200
@@ -54,7 +54,10 @@
console = Console(local, histsize=options.histsize)
banner = "Tryton %s, Python %s on %s" % (
__version__, sys.version, sys.platform)
- console.interact(banner=banner, exitmsg='')
+ kwargs = {}
+ if sys.version_info >= (3, 6):
+ kwargs['exitmsg'] = ''
+ console.interact(banner=banner, **kwargs)
else:
console = InteractiveConsole(local)
console.runcode(sys.stdin.read())