summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-01-25 14:36:38 +0100
committernfnty <git@nfnty.se>2017-01-25 14:36:38 +0100
commit8724cd5e44207e7bc0af77da72b2cd8e1a2fd5c6 (patch)
treeb0ff08ad6351c830010ae866f45aa2bc5317b449 /ranger
parent7255a023d951c0fa8aa4ee5ed8cbe49852710c97 (diff)
downloadranger-8724cd5e44207e7bc0af77da72b2cd8e1a2fd5c6.tar.gz
container.settings: Do not try to access key before being set
Fixes #446
Diffstat (limited to 'ranger')
-rw-r--r--ranger/container/settings.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/ranger/container/settings.py b/ranger/container/settings.py
index 4744de4d..f4679453 100644
--- a/ranger/container/settings.py
+++ b/ranger/container/settings.py
@@ -140,8 +140,7 @@ class Settings(SignalDispatcher, FileManagerAware):
                     signal.value = None
 
         elif name == 'use_preview_script':
-            if self._settings['preview_script'] is None and value \
-                    and self.fm.ui.is_on:
+            if self._settings.get('preview_script') is None and value and self.fm.ui.is_on:
                 self.fm.notify("Preview script undefined or not found!",
                                bad=True)