summary refs log tree commit diff stats
path: root/ranger/config/commands_sample.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger/config/commands_sample.py')
-rw-r--r--ranger/config/commands_sample.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/ranger/config/commands_sample.py b/ranger/config/commands_sample.py
index b65bc172..2df405f1 100644
--- a/ranger/config/commands_sample.py
+++ b/ranger/config/commands_sample.py
@@ -43,6 +43,7 @@ class my_edit(Command):
         # Using bad=True in fm.notify allows you to print error messages:
         if not os.path.exists(target_filename):
             self.fm.notify("The given file does not exist!", bad=True)
+            return
 
         # This executes a function from ranger.core.acitons, a module with a
         # variety of subroutines that can help you construct commands.