diff options
author | nfnty <git@nfnty.se> | 2017-02-04 11:40:58 +0100 |
---|---|---|
committer | nfnty <git@nfnty.se> | 2017-02-04 11:42:38 +0100 |
commit | b108f821d0838aaa5fea11a52c3620aec33a5340 (patch) | |
tree | c9ba4701e841a9007cc2facfa943f3b1544a10e9 /ranger/core | |
parent | 8e8493e93ec705b5296684d5884794dd446d9116 (diff) | |
download | ranger-b108f821d0838aaa5fea11a52c3620aec33a5340.tar.gz |
api.commands: Refactor function and alias commands
Diffstat (limited to 'ranger/core')
-rw-r--r-- | ranger/core/actions.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 29e1f69f..c78f61e2 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -239,8 +239,7 @@ class Actions( # pylint: disable=too-many-instance-attributes,too-many-public-m except ValueError as ex: if ranger.args.debug: raise - else: - return self.notify(ex) + return self.notify(ex) cmd.init_line(line) try: @@ -248,8 +247,7 @@ class Actions( # pylint: disable=too-many-instance-attributes,too-many-public-m except Exception as ex: # pylint: disable=broad-except if ranger.args.debug: raise - else: - self.notify(ex) + self.notify(ex) def substitute_macros(self, string, # pylint: disable=redefined-outer-name additional=None, escape=False): @@ -384,8 +382,7 @@ class Actions( # pylint: disable=too-many-instance-attributes,too-many-public-m except Exception as ex: # pylint: disable=broad-except if ranger.args.debug: raise - else: - self.notify('Error in line `%s\':\n %s' % (line, str(ex)), bad=True) + self.notify('Error in line `%s\':\n %s' % (line, str(ex)), bad=True) def execute_file(self, files, **kw): """Uses the "rifle" module to open/execute a file |