* usr/lib/byobu/include/config.py: LP: #1286249

- fall back to using the distro status file, fixes
    crash in config if status file disappears
This commit is contained in:
Dustin Kirkland 2014-02-28 16:22:55 -06:00
commit 5e254c3ea4
2 changed files with 14 additions and 2 deletions

6
debian/changelog vendored
View file

@ -1,9 +1,15 @@
byobu (5.74) unreleased; urgency=low
[ Dustin Kirkland ]
* usr/lib/byobu/include/ec2instancespricing.py: LP: #1286367
- merged in updated instance pricing script from
https://github.com/erans/ec2instancespricing
[ Jan Klepek ]
* usr/lib/byobu/include/config.py: LP: #1286249
- fall back to using the distro status file, fixes
crash in config if status file disappears
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 17 Feb 2014 15:07:01 -0600
byobu (5.73-0ubuntu1) trusty; urgency=low

View file

@ -212,10 +212,16 @@ def writestatus(items):
status[i[1]] = i[0]
for key in ["tmux_left", "tmux_right", "screen_upper_left", "screen_upper_right", "screen_lower_left", "screen_lower_right"]:
if key.startswith(BYOBU_BACKEND):
f = open(path, "r")
try:
f = open(path, "r")
except:
f = open(SHARE + '/status/status', "r")
lines = f.readlines()
f.close()
f = open(path, "w")
try:
f = open(path, "w")
except:
f = open(path, "a+")
for l in lines:
if l.startswith("%s=" % key):
val = genstatusstring(key, status)