summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2015-02-17 23:46:03 +0100
committerhut <hut@lepus.uberspace.de>2015-02-17 23:46:03 +0100
commit6064846f084b30592ee2f8c8ef9bc1be9e1438a4 (patch)
treef3307d1b05a04acec301e6603af54c039da85faa
parent0970723c8f14bb8986d3bd7cce49cd0d7575d32b (diff)
downloadranger-6064846f084b30592ee2f8c8ef9bc1be9e1438a4.tar.gz
config/commands_sample.py: return on error
-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.