Select session does not work with python 2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
byobu |
Fix Released
|
Medium
|
Dustin Kirkland |
Bug Description
In select-session.py you recently added an eval on the input when choosing with session to join/start new session/or a plain shell, however on python 2 you get a traceback when using eval on input (which is captured by the exception):
--------------- Example ----------------
#!/usr/bin/python
import os
import sys
choice = 1
choice = int(input("\nChoose 1-9 [1]: "))
sys.stdout.
choice = 1
choice = int(eval(
sys.stdout.
-------
$ python2.7 inputtest.py
Choose 1-9 [1]: 2
Choice 2
Choose 1-9 [1]: 2
Traceback (most recent call last):
File "inputtest.py", line 11, in <module>
choice = int(eval(
TypeError: eval() arg 1 must be a string or code object
python3 inputtest.py
Choose 1-9 [1]: 2
Choice 2
Choose 1-9 [1]: 2
Choice 2
Related branches
Changed in byobu: | |
status: | Fix Committed → Fix Released |
kirkland@ x250:~/ src/byobu/ byobu⟫ debcommit byobu/include/ select- session. py: LP: #1550687 src/byobu/ byobu/ byobu/include/ select- session. py
bzr commit -m '* usr/lib/
- make sure input/eval is compatible with both python2 and 3' --fixes 'lp:1550687'
Committing to: /srv/media/
modified debian/changelog
modified usr/lib/
Committed revision 2467.