Wed, 23 Apr 2008 22:31:42 +0200 <thp@perli.net>
Merge patch from Junio C Hamano to fix problems with zero-length in feeds * src/gpodder/gui.py: Update list of contributors/patch writers * src/gpodder/services.py: Patch from Junio C Hamano to fix a problem when a feed has zero length, which would otherwise result in a divide-by-zero error git-svn-id: svn://svn.berlios.de/gpodder/trunk@687 b0d088ad-0a06-0410-aad2-9ed5178a7e87
This commit is contained in:
parent
d63f123e36
commit
4e137b290e
3 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Wed, 23 Apr 2008 22:31:42 +0200 <thp@perli.net>
|
||||||
|
Merge patch from Junio C Hamano to fix problems with zero-length in feeds
|
||||||
|
|
||||||
|
* src/gpodder/gui.py: Update list of contributors/patch writers
|
||||||
|
* src/gpodder/services.py: Patch from Junio C Hamano to fix a problem
|
||||||
|
when a feed has zero length, which would otherwise result in a
|
||||||
|
divide-by-zero error
|
||||||
|
|
||||||
Tue, 22 Apr 2008 21:57:31 +0200 <thp@perli.net>
|
Tue, 22 Apr 2008 21:57:31 +0200 <thp@perli.net>
|
||||||
Typo from previous commit
|
Typo from previous commit
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,8 @@ app_authors = [
|
||||||
'Florian Richter', 'FriedBunny', 'Gerrit Sangel', 'Götz Waschk',
|
'Florian Richter', 'FriedBunny', 'Gerrit Sangel', 'Götz Waschk',
|
||||||
'Haim Roitgrund', 'Hex', 'Holger Bauer', 'Holger Leskien', 'Jens Thiele',
|
'Haim Roitgrund', 'Hex', 'Holger Bauer', 'Holger Leskien', 'Jens Thiele',
|
||||||
'Jérôme Chabod', 'Jessica Henline', 'Joel Calado', 'John Ferguson',
|
'Jérôme Chabod', 'Jessica Henline', 'Joel Calado', 'John Ferguson',
|
||||||
'José Luis Fustel', 'Joseph Bleau', 'Julio Acuña', 'Jürgen Schinker',
|
'José Luis Fustel', 'Joseph Bleau', 'Julio Acuña', 'Junio C Hamano',
|
||||||
|
'Jürgen Schinker',
|
||||||
'Konstantin Ryabitsev', 'Leonid Ponomarev', 'Mark Alford', 'Michael Salim',
|
'Konstantin Ryabitsev', 'Leonid Ponomarev', 'Mark Alford', 'Michael Salim',
|
||||||
'Mika Leppinen', 'Mike Coulson', 'Mykola Nikishov', 'narf at inode.at',
|
'Mika Leppinen', 'Mike Coulson', 'Mykola Nikishov', 'narf at inode.at',
|
||||||
'Nick L.', 'Nicolas Quienot', 'Ondrej Vesely',
|
'Nick L.', 'Nicolas Quienot', 'Ondrej Vesely',
|
||||||
|
|
|
@ -188,6 +188,8 @@ class DownloadStatusManager(ObservableService):
|
||||||
|
|
||||||
done = sum(status['progress']/100. * status['thread'].total_size for status in self.status_list.values())
|
done = sum(status['progress']/100. * status['thread'].total_size for status in self.status_list.values())
|
||||||
total = sum(status['thread'].total_size for status in self.status_list.values())
|
total = sum(status['thread'].total_size for status in self.status_list.values())
|
||||||
|
if total + self.downloads_done_bytes == 0:
|
||||||
|
return 0
|
||||||
return float(done + self.downloads_done_bytes) / float(total + self.downloads_done_bytes) * 100
|
return float(done + self.downloads_done_bytes) / float(total + self.downloads_done_bytes) * 100
|
||||||
|
|
||||||
def update_status( self, id, **kwargs):
|
def update_status( self, id, **kwargs):
|
||||||
|
|
Loading…
Reference in a new issue