diff options
author | nfnty <git@nfnty.se> | 2017-04-11 21:21:08 +0200 |
---|---|---|
committer | nfnty <git@nfnty.se> | 2017-04-11 21:26:32 +0200 |
commit | fffd0c056ebf0378308cd47f7f690d20663e3c95 (patch) | |
tree | e32a0941130b50c5274dc5d21543b87c14e1dc7c /ranger | |
parent | 305537963bb1db5b3e50213c46749f62bb84bc9a (diff) | |
download | ranger-fffd0c056ebf0378308cd47f7f690d20663e3c95.tar.gz |
container.settings: Log nonexistent `preview_script`
Related to #849
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/container/settings.py | 1 | ||||
-rw-r--r-- | ranger/core/actions.py | 12 |
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 |