* usr/lib/byobu/include/select-session.py: LP: #1550687

- make sure input/eval is compatible with both python2 and 3
This commit is contained in:
Dustin Kirkland 2016-02-28 22:09:04 -06:00
commit f041622dfe
2 changed files with 6 additions and 1 deletions

2
debian/changelog vendored
View file

@ -7,6 +7,8 @@ byobu (5.103) unreleased; urgency=medium
usr/share/man/man1/Makefile.am, usr/share/man/man1/purge-old-
kernels.1:
- move purge-old-kernels over from bikeshed into byobu
* usr/lib/byobu/include/select-session.py: LP: #1550687
- make sure input/eval is compatible with both python2 and 3
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 04 Feb 2016 16:30:00 -0600

View file

@ -125,6 +125,9 @@ if len(sessions) > 1:
sys.stdout.write(" %d. %s\n" % (i, s))
i += 1
try:
try:
choice = int(input("\nChoose 1-%d [1]: " % (i - 1)))
except:
choice = int(eval(input("\nChoose 1-%d [1]: " % (i - 1))))
if choice >= 1 and choice < i:
break