Skip to content

Commit fe5578f

Browse files
committed
Code cosmetics
1 parent 741a79e commit fe5578f

4 files changed

Lines changed: 11 additions & 24 deletions

File tree

‎module/plugins/internal/Extractor.py‎

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,6 @@
88
from module.plugins.internal.utils import encode
99

1010

11-
def renice(pid, value):
12-
if not value or os.name is "nt":
13-
return
14-
15-
try:
16-
subprocess.Popen(["renice", str(value), str(pid)],
17-
stdout=subprocess.PIPE,
18-
stderr=subprocess.PIPE,
19-
bufsize=-1)
20-
except Exception:
21-
pass
22-
23-
2411
class ArchiveError(Exception):
2512
pass
2613

@@ -36,7 +23,7 @@ class PasswordError(Exception):
3623
class Extractor(Plugin):
3724
__name__ = "Extractor"
3825
__type__ = "extractor"
39-
__version__ = "0.39"
26+
__version__ = "0.40"
4027
__status__ = "testing"
4128

4229
__description__ = """Base extractor plugin"""
@@ -58,7 +45,7 @@ def isarchive(cls, filename):
5845

5946
@classmethod
6047
def ismultipart(cls, filename):
61-
pass
48+
return False
6249

6350

6451
@classmethod

‎module/plugins/internal/Hoster.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class Hoster(Base):
1414
__name__ = "Hoster"
1515
__type__ = "hoster"
16-
__version__ = "0.41"
16+
__version__ = "0.42"
1717
__status__ = "testing"
1818

1919
__pattern__ = r'^unmatchable$'
@@ -126,10 +126,10 @@ def isdownload(self, url, resume=None, redirect=True):
126126
location = self.fixurl(header.get('location'), url)
127127
code = header.get('code')
128128

129-
if code is 302:
129+
if code == 302:
130130
link = location
131131

132-
elif code is 301:
132+
elif code == 301:
133133
url = location
134134
if redirect:
135135
continue

‎module/plugins/internal/SevenZip.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
import re
55
import subprocess
66

7-
from module.plugins.internal.UnRar import ArchiveError, CRCError, PasswordError, UnRar, renice
8-
from module.plugins.internal.utils import fs_join
7+
from module.plugins.internal.UnRar import UnRar, ArchiveError, CRCError, PasswordError
8+
from module.plugins.internal.utils import fs_join, renice
99

1010

1111
class SevenZip(UnRar):
1212
__name__ = "SevenZip"
13-
__version__ = "0.17"
13+
__version__ = "0.18"
1414
__status__ = "testing"
1515

1616
__description__ = """7-Zip extractor plugin"""

‎module/plugins/internal/UnRar.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
import string
66
import subprocess
77

8-
from module.plugins.internal.Extractor import Extractor, ArchiveError, CRCError, PasswordError, renice
9-
from module.plugins.internal.utils import decode, fs_join
8+
from module.plugins.internal.Extractor import Extractor, ArchiveError, CRCError, PasswordError
9+
from module.plugins.internal.utils import decode, fs_join, renice
1010

1111

1212
class UnRar(Extractor):
1313
__name__ = "UnRar"
14-
__version__ = "1.28"
14+
__version__ = "1.29"
1515
__status__ = "testing"
1616

1717
__description__ = """Rar extractor plugin"""

0 commit comments

Comments
 (0)