summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/extractor/UnRar.py
diff options
context:
space:
mode:
authorGravatar Armin <Armin@Armin-PC.diedering.lan> 2015-04-22 00:00:13 +0200
committerGravatar Armin <Armin@Armin-PC.diedering.lan> 2015-04-22 00:00:13 +0200
commit22d531c192d4b2b3159788d514377c43f8fdde6b (patch)
tree607d6023bc0e1068415aceefdf54fb611ac30b47 /pyload/plugin/extractor/UnRar.py
parentsome fixes (diff)
downloadpyload-22d531c192d4b2b3159788d514377c43f8fdde6b.tar.xz
now the plugin attribute '__name' is no more used it is reduntant and
obsolete
Diffstat (limited to 'pyload/plugin/extractor/UnRar.py')
-rw-r--r--pyload/plugin/extractor/UnRar.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/pyload/plugin/extractor/UnRar.py b/pyload/plugin/extractor/UnRar.py
index 38ae4e8f2..d1fc3728e 100644
--- a/pyload/plugin/extractor/UnRar.py
+++ b/pyload/plugin/extractor/UnRar.py
@@ -27,20 +27,21 @@ class UnRar(Extractor):
__description = """Rar extractor plugin"""
__license = "GPLv3"
- __authors = [("RaNaN" , "RaNaN@pyload.org" ),
- ("Walter Purcaro", "vuolter@gmail.com"),
- ("Immenz" , "immenz@gmx.net" )]
+ __authors = [("RaNaN", "RaNaN@pyload.org"),
+ ("Walter Purcaro", "vuolter@gmail.com"),
+ ("Immenz", "immenz@gmx.net")]
- CMD = "unrar"
- VERSION = ""
+ CMD = "unrar"
+ NAME = __name__
+ VERSION = ""
EXTENSIONS = [".rar"]
- re_multipart = re.compile(r'\.(part|r)(\d+)(?:\.rar)?(\.rev|\.bad)?',re.I)
+ re_multipart = re.compile(r'\.(part|r)(\d+)(?:\.rar)?(\.rev|\.bad)?', re.I)
re_filefixed = re.compile(r'Building (.+)')
- re_filelist = re.compile(r'^(.)(\s*[\w\.\-]+)\s+(\d+\s+)+(?:\d+\%\s+)?[\d\-]{8}\s+[\d\:]{5}', re.M|re.I)
+ re_filelist = re.compile(r'^(.)(\s*[\w\.\-]+)\s+(\d+\s+)+(?:\d+\%\s+)?[\d\-]{8}\s+[\d\:]{5}', re.M | re.I)
re_wrongpwd = re.compile(r'password', re.I)
re_wrongcrc = re.compile(r'encrypted|damaged|CRC failed|checksum error|corrupt', re.I)
@@ -55,7 +56,7 @@ class UnRar(Extractor):
cls.CMD = os.path.join(pypath, "RAR.exe")
p = subprocess.Popen([cls.CMD], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
- cls.__name = "RAR"
+ cls.NAME = "RAR"
cls.REPAIR = True
except OSError:
@@ -66,7 +67,7 @@ class UnRar(Extractor):
try:
p = subprocess.Popen(["rar"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
- cls.__name = "RAR"
+ cls.NAME = "RAR"
cls.REPAIR = True
except OSError: #: fallback to unrar
@@ -177,7 +178,7 @@ class UnRar(Extractor):
# eventually Multipart Files
files.extend(fs_join(dir, os.path.basename(file)) for file in filter(self.isMultipart, os.listdir(dir))
- if re.sub(self.re_multipart,".rar",name) == re.sub(self.re_multipart,".rar",file))
+ if re.sub(self.re_multipart, ".rar", name) == re.sub(self.re_multipart, ".rar", file))
return files