summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/container/settings.py1
-rw-r--r--ranger/core/actions.py12
2 files changed, 5 insertions, 8 deletions
diff --git a/ranger/container/settings.py b/ranger/container/settings.py
index 0367e699..b58165ca 100644
--- a/ranger/container/settings.py
+++ b/ranger/container/settings.py
@@ -147,6 +147,7 @@ class Settings(SignalDispatcher, FileManagerAware):
                 if os.path.exists(result):
                     signal.value = result
                 else:
+                    self.fm.notify("Preview script `{0}` doesn't exist!".format(result), bad=True)
                     signal.value = None
 
         elif name == 'use_preview_script':
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index cf5dc02e..3b30fe6b 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -1006,17 +1006,13 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
         try:
             stat_ = os.stat(self.settings.preview_script)
         except OSError:
-            self.fm.notify(
-                "Preview Script `%s' doesn't exist!" % self.settings.preview_script,
-                bad=True,
-            )
+            self.fm.notify("Preview script `{0}` doesn't exist!".format(
+                self.settings.preview_script), bad=True)
             return None
 
         if not stat_.st_mode & S_IEXEC:
-            self.fm.notify(
-                "Preview Script `%s' is not executable!" % self.settings.preview_script,
-                bad=True,
-            )
+            self.fm.notify("Preview script `{0}` is not executable!".format(
+                self.settings.preview_script), bad=True)
             return None
 
         data['loading'] = True