diff options
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/hooks/DeathByCaptcha.py | 6 | ||||
-rw-r--r-- | module/plugins/hooks/IRC.py | 2 | ||||
-rw-r--r-- | module/plugins/hooks/ImageTyperz.py | 2 | ||||
-rw-r--r-- | module/plugins/hooks/TransmissionRPC.py | 2 | ||||
-rw-r--r-- | module/plugins/hooks/UnSkipOnFail.py | 2 | ||||
-rw-r--r-- | module/plugins/hooks/XFileSharing.py | 3 |
6 files changed, 7 insertions, 10 deletions
diff --git a/module/plugins/hooks/DeathByCaptcha.py b/module/plugins/hooks/DeathByCaptcha.py index bce13f0fa..0e94c9cda 100644 --- a/module/plugins/hooks/DeathByCaptcha.py +++ b/module/plugins/hooks/DeathByCaptcha.py @@ -94,13 +94,13 @@ class DeathByCaptcha(Addon): raise DeathByCaptchaException(str(res)) except BadHeader, e: - if e.code == 403: + if e.code is 403: raise DeathByCaptchaException('not-logged-in') - elif e.code == 413: + elif e.code is 413: raise DeathByCaptchaException('invalid-captcha') - elif e.code == 503: + elif e.code is 503: raise DeathByCaptchaException('service-overload') elif e.code in (400, 405): diff --git a/module/plugins/hooks/IRC.py b/module/plugins/hooks/IRC.py index 2b7bea5fd..7dec4b798 100644 --- a/module/plugins/hooks/IRC.py +++ b/module/plugins/hooks/IRC.py @@ -219,7 +219,7 @@ class IRC(Thread, Notifier): lines = ["ID - Name - Status - Speed - ETA - Progress"] for data in downloads: - if data.status == 5: + if data.status is 5: temp_progress = data.format_wait else: temp_progress = "%d%% (%s)" % (data.percent, data.format_size) diff --git a/module/plugins/hooks/ImageTyperz.py b/module/plugins/hooks/ImageTyperz.py index 24e1687a8..864eb476e 100644 --- a/module/plugins/hooks/ImageTyperz.py +++ b/module/plugins/hooks/ImageTyperz.py @@ -100,7 +100,7 @@ class ImageTyperz(Addon): raise ImageTyperzException(res) else: data = res.split('|') - if len(data) == 2: + if len(data) is 2: ticket, result = data else: raise ImageTyperzException("Unknown response: %s" % res) diff --git a/module/plugins/hooks/TransmissionRPC.py b/module/plugins/hooks/TransmissionRPC.py index 0bc163d98..50b914f19 100644 --- a/module/plugins/hooks/TransmissionRPC.py +++ b/module/plugins/hooks/TransmissionRPC.py @@ -53,7 +53,7 @@ class TransmissionRPC(Addon): req=req) except Exception, e: - if isinstance(e, BadHeader) and e.code == 409: + if isinstance(e, BadHeader) and e.code is 409: headers = dict(re.findall(r"(?P<name>.+?): (?P<value>.+?)\r?\n", req.header)) session_id = headers['X-Transmission-Session-Id'] req.c.setopt(pycurl.HTTPHEADER, ["X-Transmission-Session-Id: %s" % session_id]) diff --git a/module/plugins/hooks/UnSkipOnFail.py b/module/plugins/hooks/UnSkipOnFail.py index 3dd9b70c4..d51030b01 100644 --- a/module/plugins/hooks/UnSkipOnFail.py +++ b/module/plugins/hooks/UnSkipOnFail.py @@ -62,7 +62,7 @@ class UnSkipOnFail(Addon): pdata = self.pyload.api.getPackageData(pinfo.pid) for link in pdata.links: #: Check if link == "skipped" - if link.status != 4: + if link.status is not 4: continue #: Check if link name collides with pdata's name diff --git a/module/plugins/hooks/XFileSharing.py b/module/plugins/hooks/XFileSharing.py index ac92a0c8c..e2f25e13f 100644 --- a/module/plugins/hooks/XFileSharing.py +++ b/module/plugins/hooks/XFileSharing.py @@ -123,6 +123,3 @@ class XFileSharing(Addon): dict = self.pyload.pluginManager.plugins[type][plugin] dict['pattern'] = r'^unmatchable$' dict['re'] = re.compile(dict['pattern']) - - - |