diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-20 19:16:11 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-20 19:16:11 +0200 |
commit | fe5578fe1a78726aa8358191cb042276cee3f983 (patch) | |
tree | a687d172a645bd7eec2fdcba94f45d924ecc4213 /module | |
parent | [utils] format_time (diff) | |
download | pyload-fe5578fe1a78726aa8358191cb042276cee3f983.tar.xz |
Code cosmetics
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/internal/Extractor.py | 17 | ||||
-rw-r--r-- | module/plugins/internal/Hoster.py | 6 | ||||
-rw-r--r-- | module/plugins/internal/SevenZip.py | 6 | ||||
-rw-r--r-- | module/plugins/internal/UnRar.py | 6 |
4 files changed, 11 insertions, 24 deletions
diff --git a/module/plugins/internal/Extractor.py b/module/plugins/internal/Extractor.py index 897fc2652..81ee99dd8 100644 --- a/module/plugins/internal/Extractor.py +++ b/module/plugins/internal/Extractor.py @@ -8,19 +8,6 @@ from module.plugins.internal.Plugin import Plugin from module.plugins.internal.utils import encode -def renice(pid, value): - if not value or os.name is "nt": - return - - try: - subprocess.Popen(["renice", str(value), str(pid)], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - bufsize=-1) - except Exception: - pass - - class ArchiveError(Exception): pass @@ -36,7 +23,7 @@ class PasswordError(Exception): class Extractor(Plugin): __name__ = "Extractor" __type__ = "extractor" - __version__ = "0.39" + __version__ = "0.40" __status__ = "testing" __description__ = """Base extractor plugin""" @@ -58,7 +45,7 @@ class Extractor(Plugin): @classmethod def ismultipart(cls, filename): - pass + return False @classmethod diff --git a/module/plugins/internal/Hoster.py b/module/plugins/internal/Hoster.py index 60a7e7779..c247fa5e3 100644 --- a/module/plugins/internal/Hoster.py +++ b/module/plugins/internal/Hoster.py @@ -13,7 +13,7 @@ from module.plugins.internal.utils import encode, exists, fixurl, fs_join, parse class Hoster(Base): __name__ = "Hoster" __type__ = "hoster" - __version__ = "0.41" + __version__ = "0.42" __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -126,10 +126,10 @@ class Hoster(Base): location = self.fixurl(header.get('location'), url) code = header.get('code') - if code is 302: + if code == 302: link = location - elif code is 301: + elif code == 301: url = location if redirect: continue diff --git a/module/plugins/internal/SevenZip.py b/module/plugins/internal/SevenZip.py index abf413fb7..9a7794b0c 100644 --- a/module/plugins/internal/SevenZip.py +++ b/module/plugins/internal/SevenZip.py @@ -4,13 +4,13 @@ import os import re import subprocess -from module.plugins.internal.UnRar import ArchiveError, CRCError, PasswordError, UnRar, renice -from module.plugins.internal.utils import fs_join +from module.plugins.internal.UnRar import UnRar, ArchiveError, CRCError, PasswordError +from module.plugins.internal.utils import fs_join, renice class SevenZip(UnRar): __name__ = "SevenZip" - __version__ = "0.17" + __version__ = "0.18" __status__ = "testing" __description__ = """7-Zip extractor plugin""" diff --git a/module/plugins/internal/UnRar.py b/module/plugins/internal/UnRar.py index 835c372ab..12855f712 100644 --- a/module/plugins/internal/UnRar.py +++ b/module/plugins/internal/UnRar.py @@ -5,13 +5,13 @@ import re import string import subprocess -from module.plugins.internal.Extractor import Extractor, ArchiveError, CRCError, PasswordError, renice -from module.plugins.internal.utils import decode, fs_join +from module.plugins.internal.Extractor import Extractor, ArchiveError, CRCError, PasswordError +from module.plugins.internal.utils import decode, fs_join, renice class UnRar(Extractor): __name__ = "UnRar" - __version__ = "1.28" + __version__ = "1.29" __status__ = "testing" __description__ = """Rar extractor plugin""" |