diff --git a/debian/changelog b/debian/changelog index 83ad1675..58050386 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ byobu (5.40) unreleased; urgency=low - hardcode a use of gawk (for hex calculations) * usr/share/doc/byobu/help.tmux.txt: LP: #1143342 - rephrase window rename help text + * usr/bin/byobu-config: LP: #1166058 + - handle non-existant keybindings file -- Dustin Kirkland Tue, 07 May 2013 22:01:40 -0500 diff --git a/usr/bin/byobu-config b/usr/bin/byobu-config index 3cbf87e4..6a9c3d42 100755 --- a/usr/bin/byobu-config +++ b/usr/bin/byobu-config @@ -265,16 +265,20 @@ def getesckey(): line = "" if BYOBU_BACKEND == "tmux": path = BYOBU_CONFIG_DIR + '/keybindings.tmux' - for l in open(path): - if l.startswith("set -g prefix "): - line = l + if os.path.exists(path): + for l in open(path): + if l.startswith("set -g prefix "): + line = l + else: + return DEF_ESC else: path = BYOBU_CONFIG_DIR + '/keybindings' - for l in open(path): - if l.startswith("escape "): - line = l - if not os.path.exists(path): - return DEF_ESC + if os.path.exists(path): + for l in open(path): + if l.startswith("escape "): + line = l + else: + return DEF_ESC if line == "": return DEF_ESC esc = line[line.find('^') + 1]