summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/addon/ExtractArchive.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-12 17:21:33 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-12 17:21:33 +0200
commit0c525f750dad3f57297836ddea02da7d42ad5969 (patch)
tree2df5f1cd3fb29c71386e197ab782a7385b8e42bd /pyload/plugin/addon/ExtractArchive.py
parentMerge branch 'stable' into 0.4.10 (diff)
downloadpyload-0c525f750dad3f57297836ddea02da7d42ad5969.tar.xz
Other import fixes (4)
Diffstat (limited to 'pyload/plugin/addon/ExtractArchive.py')
-rw-r--r--pyload/plugin/addon/ExtractArchive.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pyload/plugin/addon/ExtractArchive.py b/pyload/plugin/addon/ExtractArchive.py
index 53bf5559d..27e773a8c 100644
--- a/pyload/plugin/addon/ExtractArchive.py
+++ b/pyload/plugin/addon/ExtractArchive.py
@@ -52,8 +52,8 @@ except ImportError:
pass
if os.name != "nt":
- from grp import getgrnam
- from pwd import getpwnam
+ import grp
+ import pwd
from pyload.plugin.Addon import Addon, threaded, Expose
from pyload.plugin.Extractor import ArchiveError, CRCError, PasswordError
@@ -563,8 +563,8 @@ class ExtractArchive(Addon):
os.chmod(f, int(self.config.get("permission", "folder"), 8))
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]
+ uid = pwd.getpwnam(self.config.get("permission", "user"))[2]
+ gid = grp.getgrnam(self.config.get("permission", "group"))[2]
os.chown(f, uid, gid)
except Exception, e: