diff options
author | hut <hut@lavabit.com> | 2010-10-10 01:56:32 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-10-10 01:56:32 +0200 |
commit | a7e9affcd6bbede10119031c1cb667486c8e6952 (patch) | |
tree | a51d16f02c795e997c91ff68a0da1af384834309 | |
parent | 4f202b05fd31fbfeb85a382154f3c568467d4043 (diff) | |
download | ranger-a7e9affcd6bbede10119031c1cb667486c8e6952.tar.gz |
core.actions: catch exception in get_preview
-rw-r--r-- | ranger/core/actions.py | 5 |
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 |