* usr/bin/byobu-config: LP: #1097922, #1098102

- ensure byobu-config works even if ~/.profile doesn't exist
This commit is contained in:
Dustin Kirkland 2013-01-14 13:44:01 -06:00
commit ac85ee959f
2 changed files with 8 additions and 4 deletions

3
debian/changelog vendored
View file

@ -1,6 +1,7 @@
byobu (5.27) unreleased; urgency=low
* UNRELEASED
* usr/bin/byobu-config: LP: #1097922, #1098102
- ensure byobu-config works even if ~/.profile doesn't exist
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 10 Jan 2013 16:36:23 -0600

View file

@ -327,9 +327,12 @@ def chgesc(snackScreen, size):
def autolaunch():
if os.path.exists(BYOBU_CONFIG_DIR + "/disable-autolaunch"):
return 0
for line in open("%s/.profile" % HOME):
if "byobu-launch" in line:
return 1
try:
for line in open("%s/.profile" % HOME):
if "byobu-launch" in line:
return 1
except:
return 0
if os.path.exists("/etc/profile.d/Z98-%s.sh" % PKG):
return 1
return 0