From 013f05a47a1ccda515e3d68d15dda306475834f6 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Sat, 19 Jan 2013 13:57:44 -0600 Subject: [PATCH] * usr/bin/byobu-select-session: LP: #1098102 - fix regression with Python2.6 compatibility, use Popen instead of check_output --- debian/changelog | 3 +++ usr/bin/byobu-select-session | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index bf1836e9..35d10bc8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Tue, 15 Jan 2013 19:26:40 -0600 diff --git a/usr/bin/byobu-select-session b/usr/bin/byobu-select-session index 6d922d12..e0446478 100755 --- a/usr/bin/byobu-select-session +++ b/usr/bin/byobu-select-session @@ -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():