[#106 state:fixed] Wrapped getJobDesc in a try except in case it isn't defined yet.

This commit is contained in:
Virgil Dupras 2010-10-04 09:40:46 +02:00
parent 5b6891dd45
commit a50a3b0123
1 changed files with 6 additions and 2 deletions

View File

@ -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