From 9bd093a03ca1a9736c0d00fecc4ec3088261c1ea Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Fri, 24 Sep 2010 09:56:08 +0200 Subject: [PATCH] [#106 state:fixed] I couldn't find the root cause of the problem, but I wrapped it anyway... --- core/app_cocoa_inter.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/app_cocoa_inter.py b/core/app_cocoa_inter.py index 29b535f6..a8585981 100644 --- a/core/app_cocoa_inter.py +++ b/core/app_cocoa_inter.py @@ -127,7 +127,13 @@ class PyDupeGuruBase(PyRegistrable): #---Worker def getJobProgress(self): - return self.py.progress.last_progress + try: + return self.py.progress.last_progress + except AttributeError: + # I have *no idea* why this can possible happen (last_progress is always set by + # create_job() *before* any threaded job notification, which shows the progress panel, + # is sent), but it happens anyway, so there we go. + return -1 def getJobDesc(self): return self.py.progress.last_desc