Fix #1485 ("Stop Job" on download of recipes causes repeated error)

This commit is contained in:
Kovid Goyal 2008-12-29 09:50:38 -08:00
parent d7b440024b
commit 53e2e7b314

View File

@ -128,7 +128,10 @@ class JobManager(QAbstractTableModel):
self.emit(SIGNAL('layoutChanged()')) self.emit(SIGNAL('layoutChanged()'))
def _status_update(self, job): def _status_update(self, job):
try:
row = self.jobs.index(job) row = self.jobs.index(job)
except ValueError: # Job has been stopped
return
self.emit(SIGNAL('dataChanged(QModelIndex, QModelIndex)'), self.emit(SIGNAL('dataChanged(QModelIndex, QModelIndex)'),
self.index(row, 0), self.index(row, 3)) self.index(row, 0), self.index(row, 3))