mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* usr/bin/byobu-select-session:
- Handle `screen -ls' returning 1. (LP: #1098341)
This commit is contained in:
commit
03a0a59da5
2 changed files with 12 additions and 3 deletions
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,6 +1,8 @@
|
||||||
byobu (5.26) unreleased; urgency=low
|
byobu (5.26) UNRELEASED; urgency=low
|
||||||
|
|
||||||
* UNRELEASED
|
[ Iain Lane ]
|
||||||
|
* usr/bin/byobu-select-session:
|
||||||
|
- Handle `screen -ls' returning 1. (LP: #1098341)
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 09 Jan 2013 15:17:43 -0600
|
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 09 Jan 2013 15:17:43 -0600
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,14 @@ def get_sessions():
|
||||||
sessions = []
|
sessions = []
|
||||||
i = 0
|
i = 0
|
||||||
if BYOBU_BACKEND == "screen":
|
if BYOBU_BACKEND == "screen":
|
||||||
|
try:
|
||||||
output = subprocess.check_output(["screen", "-ls"])
|
output = subprocess.check_output(["screen", "-ls"])
|
||||||
|
except subprocess.CalledProcessError as cpe:
|
||||||
|
# screen -ls seems to always return 1
|
||||||
|
if cpe.returncode != 1:
|
||||||
|
raise
|
||||||
|
else:
|
||||||
|
output = cpe.output
|
||||||
output = output.decode(sys.stdout.encoding)
|
output = output.decode(sys.stdout.encoding)
|
||||||
if output:
|
if output:
|
||||||
for s in output.splitlines():
|
for s in output.splitlines():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue