projects
/
quix0rs-apt-p2p.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
50d3a09
)
Fixed a bug in the HTTP downloader that caused errors with some mirrors that always...
author
Cameron Dale
<camrdale@gmail.com>
Sun, 4 May 2008 21:16:25 +0000
(14:16 -0700)
committer
Cameron Dale
<camrdale@gmail.com>
Sun, 4 May 2008 21:16:25 +0000
(14:16 -0700)
apt_p2p/HTTPDownloader.py
patch
|
blob
|
history
diff --git
a/apt_p2p/HTTPDownloader.py
b/apt_p2p/HTTPDownloader.py
index d1ea0a93cebe1ee9095355d3f6e9eb2edc4eab27..1a0752c4e087a46a8bd562634d986c34a897576f 100644
(file)
--- a/
apt_p2p/HTTPDownloader.py
+++ b/
apt_p2p/HTTPDownloader.py
@@
-358,8
+358,9
@@
class Peer(ClientFactory):
def _processLastResponse(self):
"""Save the download time of the last request for speed calculations."""
if self._lastResponse is not None:
def _processLastResponse(self):
"""Save the download time of the last request for speed calculations."""
if self._lastResponse is not None:
- now = datetime.now()
- self._downloadSpeeds.append((now, now - self._lastResponse[0], self._lastResponse[1]))
+ if self._lastResponse[1] is not None:
+ now = datetime.now()
+ self._downloadSpeeds.append((now, now - self._lastResponse[0], self._lastResponse[1]))
self._lastResponse = None
def downloadSpeed(self):
self._lastResponse = None
def downloadSpeed(self):