summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/addon/ExtractArchive.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-16 17:48:30 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-16 18:06:38 +0200
commit6cdb1ae0fe8f4faf897220d0520ca3e753e9f3e4 (patch)
tree24a8d6e3c2e62597b6cd3a75b77bf1a6470bd702 /pyload/plugin/addon/ExtractArchive.py
parentFix lib import (diff)
downloadpyload-6cdb1ae0fe8f4faf897220d0520ca3e753e9f3e4.tar.xz
[config] Use get method instead dict access
Diffstat (limited to 'pyload/plugin/addon/ExtractArchive.py')
-rw-r--r--pyload/plugin/addon/ExtractArchive.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/pyload/plugin/addon/ExtractArchive.py b/pyload/plugin/addon/ExtractArchive.py
index a4a28ab32..26d3f07d9 100644
--- a/pyload/plugin/addon/ExtractArchive.py
+++ b/pyload/plugin/addon/ExtractArchive.py
@@ -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: