* usr/bin/byobu-select-session: LP: #1098102

- fix regression with Python2.6 compatibility, use Popen instead of
    check_output
This commit is contained in:
Dustin Kirkland 2013-01-19 13:57:44 -06:00
commit 013f05a47a
2 changed files with 5 additions and 2 deletions

3
debian/changelog vendored
View file

@ -65,6 +65,9 @@ byobu (5.29) unreleased; urgency=low
usr/share/man/man1/byobu-status.1, usr/share/man/man1/byobu-status-
detail.1, usr/share/man/man1/byobu-tmux.1:
- updated email address from kirkland@ubuntu.com to kirkland@byobu.co
* usr/bin/byobu-select-session: LP: #1098102
- fix regression with Python2.6 compatibility, use Popen instead of
check_output
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 15 Jan 2013 19:26:40 -0600

View file

@ -42,7 +42,7 @@ def get_sessions():
i = 0
if BYOBU_BACKEND == "screen":
try:
output = subprocess.check_output(["screen", "-ls"])
output = subprocess.Popen(["screen", "-ls"], stdout=subprocess.PIPE).communicate()[0]
except subprocess.CalledProcessError as cpe:
# screen -ls seems to always return 1
if cpe.returncode != 1:
@ -60,7 +60,7 @@ def get_sessions():
sessions.append("screen____%s" % items[1])
i += 1
if BYOBU_BACKEND == "tmux":
output = subprocess.check_output(["tmux", "list-sessions"])
output = subprocess.Popen(["tmux", "list-sessions"], stdout=subprocess.PIPE).communicate()[0]
output = output.decode(sys.stdout.encoding)
if output:
for s in output.splitlines():