diff options
| author | 2010-12-12 18:39:25 +0100 | |
|---|---|---|
| committer | 2010-12-12 18:39:25 +0100 | |
| commit | 62ef06e030180ea8ba2fd31c41c40246a3ade740 (patch) | |
| tree | 65d40f395cea53d0531ad1f5c0f5be7f4bf565ac /module/gui | |
| parent | universal progress (ex. unrar progress), link info now emits update event, up... (diff) | |
| download | pyload-62ef06e030180ea8ba2fd31c41c40246a3ade740.tar.xz | |
missing files...
Diffstat (limited to 'module/gui')
| -rw-r--r-- | module/gui/Queue.py | 10 | 
1 files changed, 8 insertions, 2 deletions
| diff --git a/module/gui/Queue.py b/module/gui/Queue.py index eb13415f0..d60858e34 100644 --- a/module/gui/Queue.py +++ b/module/gui/Queue.py @@ -116,12 +116,18 @@ class QueueModel(CollectorModel):      def getProgress(self, item):          locker = QMutexLocker(self.mutex)          if isinstance(item, Link): -            return int(item.data["progress"]) +            try: +                return int(item.data["progress"]) +            except: +                return 0          elif isinstance(item, Package):              count = len(item.children)              perc_sum = 0              for child in item.children: -                perc_sum += int(child.data["progress"]) +                try: +                    perc_sum += int(child.data["progress"]) +                except: +                    pass              if count == 0:                  return 0              return perc_sum/count | 
