From 761ca5c66e07559925ebbdbc6531f9ca658b12ce Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 16:11:58 +0200 Subject: Code cosmetics --- module/plugins/internal/Hoster.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/internal/Hoster.py') diff --git a/module/plugins/internal/Hoster.py b/module/plugins/internal/Hoster.py index 1cc127522..dbc5e88a8 100644 --- a/module/plugins/internal/Hoster.py +++ b/module/plugins/internal/Hoster.py @@ -408,7 +408,7 @@ class Hoster(Plugin): if newname: newname = urlparse.urlparse(newname).path.split('/')[-1] - if disposition and newname != name: + if disposition and newname not is name: self.log_info(_("%(name)s saved as %(newname)s") % {'name': name, 'newname': newname}) self.pyfile.name = newname filename = os.path.join(location, newname) @@ -550,7 +550,7 @@ class Hoster(Plugin): baseurl = "%s://%s" % (url_p.scheme, url_p.netloc) location = urlparse.urljoin(baseurl, location) - if 'code' in header and header['code'] is 302: + if 'code' in header and header['code'] == 302: link = location if follow_location: @@ -597,7 +597,7 @@ class Hoster(Plugin): if traffic is None: return False - elif traffic is -1: + elif traffic == -1: return True else: size = self.pyfile.size / 1024 -- cgit v1.2.3