From c8d84d00591a7025d0512eed551cb96302e31229 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 25 Dec 2009 06:05:34 +0100 Subject: display exceptions while loading --- ranger/fsobject/loader.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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?""" -- cgit 1.4.1-2-gfad0