summary refs log tree commit diff stats
path: root/ranger/core
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-02-04 11:40:58 +0100
committernfnty <git@nfnty.se>2017-02-04 11:42:38 +0100
commitb108f821d0838aaa5fea11a52c3620aec33a5340 (patch)
treec9ba4701e841a9007cc2facfa943f3b1544a10e9 /ranger/core
parent8e8493e93ec705b5296684d5884794dd446d9116 (diff)
downloadranger-b108f821d0838aaa5fea11a52c3620aec33a5340.tar.gz
api.commands: Refactor function and alias commands
Diffstat (limited to 'ranger/core')
-rw-r--r--ranger/core/actions.py9
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