* usr/bin/byobu-select-session:

- fix python exception
This commit is contained in:
Dustin Kirkland 2013-02-06 22:00:31 -06:00
commit 3a25b2e7ca
2 changed files with 5 additions and 1 deletions

2
debian/changelog vendored
View file

@ -20,6 +20,8 @@ byobu (5.31) unreleased; urgency=low
* usr/bin/byobu-launcher-install, usr/bin/byobu-launcher-uninstall:
- LP: #1002137
- support fish shell in the installer
* usr/bin/byobu-select-session:
- fix python exception
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 28 Jan 2013 02:21:15 -0600

View file

@ -40,6 +40,7 @@ BYOBU_UPDATE_ENVVARS = ["DISPLAY", "DBUS_SESSION_BUS_ADDRESS", "SESSION_MANAGER"
def get_sessions():
sessions = []
i = 0
output = False
if BYOBU_BACKEND == "screen":
try:
output = subprocess.Popen(["screen", "-ls"], stdout=subprocess.PIPE).communicate()[0]
@ -49,7 +50,8 @@ def get_sessions():
raise
else:
output = cpe.output
output = output.decode(sys.stdout.encoding)
if not sys.stdout.encoding is None:
output = output.decode(sys.stdout.encoding)
if output:
for s in output.splitlines():
s = re.sub(r'\s+', ' ', s)