diff options
author | hut <hut@lavabit.com> | 2009-12-25 06:05:34 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-12-25 06:05:34 +0100 |
commit | c8d84d00591a7025d0512eed551cb96302e31229 (patch) | |
tree | 76a3b818051ad09b6f544a7bcd2d2b49dc2afc2d /ranger | |
parent | 1743e8b97744bc4dbb9277e9de36c3bec31cd428 (diff) | |
download | ranger-c8d84d00591a7025d0512eed551cb96302e31229.tar.gz |
display exceptions while loading
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/fsobject/loader.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ranger/fsobject/loader.py b/ranger/fsobject/loader.py index aaf38117..3a2020fb 100644 --- a/ranger/fsobject/loader.py +++ b/ranger/fsobject/loader.py @@ -1,6 +1,7 @@ from collections import deque from time import time from ranger import log +from ranger.shared import FileManagerAware import math def status_generator(): @@ -20,7 +21,7 @@ class LoadableObject(object): return self.description -class Loader(object): +class Loader(FileManagerAware): seconds_of_work_time = 0.05 def __init__(self): @@ -104,6 +105,8 @@ class Loader(object): except StopIteration: item.load_generator = None self.queue.popleft() + except Exception as err: + self.fm.ui.display(str(err), bad=True) def has_work(self): """Is there anything to load?""" |