From a50a3b01236dcbc7a95fb60c9e662b2c52b1bacb Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Mon, 4 Oct 2010 09:40:46 +0200 Subject: [PATCH] [#106 state:fixed] Wrapped getJobDesc in a try except in case it isn't defined yet. --- core/app_cocoa_inter.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/app_cocoa_inter.py b/core/app_cocoa_inter.py index a9825ffd..1793cd74 100644 --- a/core/app_cocoa_inter.py +++ b/core/app_cocoa_inter.py @@ -142,11 +142,15 @@ class PyDupeGuruBase(PyFairware): 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. + # is sent), but it happens anyway, so there we go. ref: #106 return -1 def getJobDesc(self): - return self.py.progress.last_desc + try: + return self.py.progress.last_desc + except AttributeError: + # see getJobProgress + return '' def cancelJob(self): self.py.progress.job_cancelled = True