diff options
author | ardi69 <armin@diedering.de> | 2015-04-18 14:08:18 +0200 |
---|---|---|
committer | ardi69 <armin@diedering.de> | 2015-04-18 14:08:18 +0200 |
commit | 6e8f84e1dc06cff6fa9387559992f555182c1774 (patch) | |
tree | 476600f9896fae029880e4049eb4c5e6021b202d /pyload/network/HTTPDownload.py | |
parent | fix: config cast (diff) | |
parent | Spare code cosmetics (5) (diff) | |
download | pyload-6e8f84e1dc06cff6fa9387559992f555182c1774.tar.xz |
Merge pull request #3 from vuolter/0.4.10
merge vuolter HEAD
Diffstat (limited to 'pyload/network/HTTPDownload.py')
-rw-r--r-- | pyload/network/HTTPDownload.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pyload/network/HTTPDownload.py b/pyload/network/HTTPDownload.py index 32c165f82..13666195a 100644 --- a/pyload/network/HTTPDownload.py +++ b/pyload/network/HTTPDownload.py @@ -72,7 +72,8 @@ class HTTPDownload(object): @property def percent(self): - if not self.size: return 0 + if not self.size: + return 0 return (self.arrived * 100) / self.size @@ -134,7 +135,8 @@ class HTTPDownload(object): finally: self.close() - if self.nameDisposition and self.disposition: return self.nameDisposition + if self.nameDisposition and self.disposition: + return self.nameDisposition return None @@ -295,7 +297,8 @@ class HTTPDownload(object): def findChunk(self, handle): """ linear search to find a chunk (should be ok since chunk size is usually low) """ for chunk in self.chunks: - if chunk.c == handle: return chunk + if chunk.c == handle: + return chunk def closeChunk(self, chunk): |