diff options
-rw-r--r-- | ranger/defaults/apps.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/ranger/defaults/apps.py b/ranger/defaults/apps.py index 347b9ce2..5be33828 100644 --- a/ranger/defaults/apps.py +++ b/ranger/defaults/apps.py @@ -151,15 +151,18 @@ class CustomApplications(Applications): if len(c.files) > 1: return tup('feh', *c) - from collections import deque + try: + from collections import deque - directory = self.fm.env.get_directory(c.file.dirname) - images = [f.path for f in directory.files if f.image] - position = images.index(c.file.path) - deq = deque(images) - deq.rotate(-position) + directory = self.fm.env.get_directory(c.file.dirname) + images = [f.path for f in directory.files if f.image] + position = images.index(c.file.path) + deq = deque(images) + deq.rotate(-position) - return tup('feh', *deq) + return tup('feh', *deq) + except: + return tup('feh', *c) @depends_on("gimp") def app_gimp(self, c): |