summaryrefslogtreecommitdiffstats
path: root/pyload/network/HTTPDownload.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-18 00:29:55 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-18 00:29:55 +0200
commitbb5a115533711fd8bb87f53cb32ff7342137208d (patch)
tree476600f9896fae029880e4049eb4c5e6021b202d /pyload/network/HTTPDownload.py
parentPEP-8, Python Zen, refactor and reduce code (part 6 in master module/common) (diff)
downloadpyload-bb5a115533711fd8bb87f53cb32ff7342137208d.tar.xz
Spare code cosmetics (5)
Diffstat (limited to 'pyload/network/HTTPDownload.py')
-rw-r--r--pyload/network/HTTPDownload.py9
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):