aboutsummaryrefslogtreecommitdiffstats
path: root/clients/urwid/main.py
diff options
context:
space:
mode:
authorBlake DeMarcy <ofunknowndescent@gmail.com>2017-04-14 17:05:05 -0500
committerBlake DeMarcy <ofunknowndescent@gmail.com>2017-04-14 17:05:05 -0500
commit2a2a9e8762616b85b3f4d2d031c87db7a57a20eb (patch)
tree19baded7213204c72c943767312ac467f9dfc337 /clients/urwid/main.py
parent42b934929b3cd247726ea87a85e3dce7c48b16b6 (diff)
downloadbbj-2a2a9e8762616b85b3f4d2d031c87db7a57a20eb.tar.gz
add fix for null values in bbjrc
Diffstat (limited to 'clients/urwid/main.py')
-rw-r--r--clients/urwid/main.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/clients/urwid/main.py b/clients/urwid/main.py
index 9549907..20695e3 100644
--- a/clients/urwid/main.py
+++ b/clients/urwid/main.py
@@ -163,7 +163,8 @@ colornames = ["none", "red", "yellow", "green", "blue", "cyan", "magenta"]
editors = ["nano", "vim", "emacs", "vim -u NONE", "emacs -Q", "micro", "ed", "joe"]
default_prefs = {
- "editor": os.getenv("EDITOR", default="nano"),
+ # using default= is not completely reliable, sadly...
+ "editor": os.getenv("EDITOR") or "nano",
"shift_multiplier": 5,
"integrate_external_editor": True,
"dramatic_exit": True,
@@ -1589,6 +1590,12 @@ def bbjrc(mode, **params):
for key, default_value in default_prefs.items():
if key not in values:
values[key] = default_value
+ elif values[key] == None:
+ # HACK: settings should never be null, ~vilmibm ran into
+ # a null value and im not sure where. putting this here
+ # to correct it automatically for anyone else that may
+ # have been affected
+ values[key] = default_value
# else make one
except FileNotFoundError:
values = default_prefs
Un proyecto texto-plano.xyz