diff options
Diffstat (limited to 'pyload/plugin/addon/ExtractArchive.py')
-rw-r--r-- | pyload/plugin/addon/ExtractArchive.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pyload/plugin/addon/ExtractArchive.py b/pyload/plugin/addon/ExtractArchive.py index bc1b06306..a106d22ab 100644 --- a/pyload/plugin/addon/ExtractArchive.py +++ b/pyload/plugin/addon/ExtractArchive.py @@ -198,11 +198,11 @@ class ExtractArchive(Addon): while packages: if self.lastPackage: #: called from allDownloadsProcessed self.lastPackage = False - if self.extract(packages, thread): # @NOTE: check only if all gone fine, no failed reporting for now + if self.extract(packages, thread): #@NOTE: check only if all gone fine, no failed reporting for now self.manager.dispatchEvent("all_archives_extracted") self.manager.dispatchEvent("all_archives_processed") else: - if self.extract(packages, thread): # @NOTE: check only if all gone fine, no failed reporting for now + if self.extract(packages, thread): #@NOTE: check only if all gone fine, no failed reporting for now pass packages = self.queue.get() #: check for packages added during extraction @@ -234,7 +234,7 @@ class ExtractArchive(Addon): @Expose - def extract(self, ids, thread=None): # @TODO: Use pypack, not pid to improve method usability + def extract(self, ids, thread=None): #@TODO: Use pypack, not pid to improve method usability if not ids: return False @@ -264,7 +264,7 @@ class ExtractArchive(Addon): # reload from txt file self.reloadPasswords() - download_folder = self.config['general']['download_folder'] + download_folder = self.config.get("general", "download_folder") # iterate packages -> extractors -> targets for pid in ids: @@ -551,16 +551,16 @@ class ExtractArchive(Addon): continue try: - if self.config['permission']['change_file']: + if self.config.get("permission", "change_file"): if os.path.isfile(f): - os.chmod(f, int(self.config['permission']['file'], 8)) + os.chmod(f, int(self.config.get("permission", "file"), 8)) elif os.path.isdir(f): - os.chmod(f, int(self.config['permission']['folder'], 8)) + os.chmod(f, int(self.config.get("permission", "folder"), 8)) - if self.config['permission']['change_dl'] and os.name != "nt": - uid = getpwnam(self.config['permission']['user'])[2] - gid = getgrnam(self.config['permission']['group'])[2] + if self.config.get("permission", "change_dl") and os.name != "nt": + uid = getpwnam(self.config.get("permission", "user"))[2] + gid = getgrnam(self.config.get("permission", "group"))[2] os.chown(f, uid, gid) except Exception, e: |