about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-10-10 01:56:32 +0200
committerhut <hut@lavabit.com>2010-10-10 01:56:32 +0200
commita7e9affcd6bbede10119031c1cb667486c8e6952 (patch)
treea51d16f02c795e997c91ff68a0da1af384834309 /ranger
parent4f202b05fd31fbfeb85a382154f3c568467d4043 (diff)
downloadranger-a7e9affcd6bbede10119031c1cb667486c8e6952.tar.gz
core.actions: catch exception in get_preview
Diffstat (limited to 'ranger')
-rw-r--r--ranger/core/actions.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index d0ccfe2b..c0d3e025 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -625,7 +625,10 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 			else:
 				return found
 		else:
-			return open(path, 'r')
+			try:
+				return open(path, 'r')
+			except:
+				return None
 
 	# --------------------------
 	# -- Tabs