summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/Plugin.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/Plugin.py
parentMerge branch 'stable' into 0.4.10 (diff)
downloadpyload-0c525f750dad3f57297836ddea02da7d42ad5969.tar.xz
Other import fixes (4)
Diffstat (limited to 'pyload/plugin/Plugin.py')
-rw-r--r--pyload/plugin/Plugin.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/pyload/plugin/Plugin.py b/pyload/plugin/Plugin.py
index 6648c574f..1657ee529 100644
--- a/pyload/plugin/Plugin.py
+++ b/pyload/plugin/Plugin.py
@@ -13,8 +13,8 @@ import urllib
import urlparse
if os.name != "nt":
- from pwd import getpwnam
- from grp import getgrnam
+ import grp
+ import pwd
from pyload.utils import fs_decode, fs_encode, safe_filename, fs_join, encode
@@ -545,9 +545,9 @@ class Plugin(Base):
res = encode(res)
if self.core.debug:
- from inspect import currentframe
+ import inspect
- frame = currentframe()
+ frame = inspect.currentframe()
framefile = fs_join("tmp", self.getClassName(), "%s_line%s.dump.html" % (frame.f_back.f_code.co_name, frame.f_back.f_lineno))
try:
if not os.path.exists(os.path.join("tmp", self.getClassName())):
@@ -622,8 +622,8 @@ class Plugin(Base):
os.makedirs(location, int(self.core.config.get("permission", "folder"), 8))
if self.core.config.get("permission", "change_dl") and os.name != "nt":
- uid = getpwnam(self.core.config.get("permission", "user"))[2]
- gid = getgrnam(self.core.config.get("permission", "group"))[2]
+ uid = pwd.getpwnam(self.core.config.get("permission", "user"))[2]
+ gid = grp.getgrnam(self.core.config.get("permission", "group"))[2]
os.chown(location, uid, gid)
except Exception, e:
@@ -662,8 +662,8 @@ class Plugin(Base):
if self.core.config.get("permission", "change_dl") and os.name != "nt":
try:
- uid = getpwnam(self.core.config.get("permission", "user"))[2]
- gid = getgrnam(self.core.config.get("permission", "group"))[2]
+ uid = pwd.getpwnam(self.core.config.get("permission", "user"))[2]
+ gid = grp.getgrnam(self.core.config.get("permission", "group"))[2]
os.chown(fs_filename, uid, gid)
except Exception, e: