diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-11-10 00:19:51 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-11-10 00:19:51 +0100 |
commit | c9e31d875d32de31e54959b82bc35eff2b3e0f3f (patch) | |
tree | 5022eadf2ac5c65ba075f172af873b737310ed66 /module/plugins/hoster/Ftp.py | |
parent | [Keep2shareCc] Fix account __name__ (diff) | |
download | pyload-c9e31d875d32de31e54959b82bc35eff2b3e0f3f.tar.xz |
Code cosmetics
Diffstat (limited to 'module/plugins/hoster/Ftp.py')
-rw-r--r-- | module/plugins/hoster/Ftp.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/plugins/hoster/Ftp.py b/module/plugins/hoster/Ftp.py index 5b8ed1ab8..9f79d80b5 100644 --- a/module/plugins/hoster/Ftp.py +++ b/module/plugins/hoster/Ftp.py @@ -53,14 +53,14 @@ class Ftp(Hoster): self.req.http.c.setopt(pycurl.NOBODY, 1) try: - response = self.load(pyfile.url) + res = self.load(pyfile.url) except pycurl.error, e: self.fail(_("Error %d: %s") % e.args) self.req.http.c.setopt(pycurl.NOBODY, 0) self.logDebug(self.req.http.header) - m = re.search(r"Content-Length:\s*(\d+)", response) + m = re.search(r"Content-Length:\s*(\d+)", res) if m: pyfile.size = int(m.group(1)) self.download(pyfile.url) @@ -71,8 +71,8 @@ class Ftp(Hoster): pkgname = "/".join(pyfile.package().name, urlparse(pyfile.url).path.rpartition('/')[2]) pyfile.url += '/' self.req.http.c.setopt(48, 1) # CURLOPT_DIRLISTONLY - response = self.load(pyfile.url, decode=False) - links = [pyfile.url + quote(x) for x in response.splitlines()] + res = self.load(pyfile.url, decode=False) + links = [pyfile.url + quote(x) for x in res.splitlines()] self.logDebug("LINKS", links) self.core.api.addPackage(pkgname, links) else: |