about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-25 06:05:34 +0100
committerhut <hut@lavabit.com>2009-12-25 06:05:34 +0100
commitc8d84d00591a7025d0512eed551cb96302e31229 (patch)
tree76a3b818051ad09b6f544a7bcd2d2b49dc2afc2d /ranger
parent1743e8b97744bc4dbb9277e9de36c3bec31cd428 (diff)
downloadranger-c8d84d00591a7025d0512eed551cb96302e31229.tar.gz
display exceptions while loading
Diffstat (limited to 'ranger')
-rw-r--r--ranger/fsobject/loader.py5
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?"""