diff options
author | nfnty <git@nfnty.se> | 2017-03-18 15:10:12 +0100 |
---|---|---|
committer | nfnty <git@nfnty.se> | 2017-03-18 15:10:12 +0100 |
commit | d842a31471e20ede89541d805a78081fe42f674b (patch) | |
tree | fe9ea3e1e7042ad49a9b0022958de41a2d0d59e4 | |
parent | 6b4c87186d42e8ac3f735acc206b07c631be381a (diff) | |
download | ranger-d842a31471e20ede89541d805a78081fe42f674b.tar.gz |
gui.curses_shortcuts: Fix handling of strings for `add*` functions
Fixes #833
-rw-r--r-- | ranger/gui/curses_shortcuts.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ranger/gui/curses_shortcuts.py b/ranger/gui/curses_shortcuts.py index 78aad240..ac067d01 100644 --- a/ranger/gui/curses_shortcuts.py +++ b/ranger/gui/curses_shortcuts.py @@ -35,7 +35,7 @@ class CursesShortcuts(SettingsAware): try: self.win.addstr(*args) - except curses.error: + except (curses.error, TypeError): if len(args) > 1: self.win.move(y, x) @@ -49,7 +49,7 @@ class CursesShortcuts(SettingsAware): try: self.win.addnstr(*args) - except curses.error: + except (curses.error, TypeError): if len(args) > 2: self.win.move(y, x) @@ -63,7 +63,7 @@ class CursesShortcuts(SettingsAware): args = [args[1], args[0]] + list(args[2:]) try: self.win.addch(*args) - except curses.error: + except (curses.error, TypeError): pass def color(self, *keys): |