From 0de30334148e2d5a8b980ea4bf95c7828d2c391d Mon Sep 17 00:00:00 2001 From: Michael Lazar Date: Tue, 9 Feb 2016 23:08:44 -0800 Subject: [PATCH] Updated bindings in __main__. --- rtv/__main__.py | 5 ++++- rtv/objects.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/rtv/__main__.py b/rtv/__main__.py index ee49b7d..ff470df 100644 --- a/rtv/__main__.py +++ b/rtv/__main__.py @@ -45,7 +45,10 @@ def main(): config = Config() config.update(**fargs) config.update(**args) - config.keymap.update(**bindings) + + # If key bindings are supplied in the config file, overwrite the defaults + if bindings: + config.keymap.set_bindings(bindings) # Copy the default config file and quit if config['copy_config']: diff --git a/rtv/objects.py b/rtv/objects.py index cda6979..93ec0e8 100644 --- a/rtv/objects.py +++ b/rtv/objects.py @@ -610,6 +610,7 @@ class KeyMap(object): """ def __init__(self, bindings): + self._keymap = None self.set_bindings(bindings) def set_bindings(self, bindings):