summaryrefslogtreecommitdiffstats
path: root/pyload/utils/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/utils/__init__.py')
-rw-r--r--pyload/utils/__init__.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/pyload/utils/__init__.py b/pyload/utils/__init__.py
index 5033780c0..ef30a0996 100644
--- a/pyload/utils/__init__.py
+++ b/pyload/utils/__init__.py
@@ -12,7 +12,6 @@ import time
# from gettext import gettext
import pylgettext as gettext
from htmlentitydefs import name2codepoint
-from os.path import join
from string import maketrans
from urllib import unquote
@@ -26,7 +25,7 @@ json_loads = json.loads
json_dumps = json.dumps
-def chmod(*args):
+def os.chmod(*args):
try:
os.chmod(*args)
except Exception:
@@ -79,7 +78,7 @@ def save_path(name):
def fs_join(*args):
""" joins a path, encoding aware """
- return fs_encode(join(*[x if type(x) == unicode else decode(x) for x in args]))
+ return fs_encode(os.path.join(*[x if type(x) == unicode else decode(x) for x in args]))
#: Deprecated method
@@ -257,12 +256,11 @@ def versiontuple(v): #: By kindall (http://stackoverflow.com/a/11887825)
def load_translation(name, locale, default="en"):
""" Load language and return its translation object or None """
- from os.path import join
from traceback import print_exc
try:
gettext.setpaths([join(os.sep, "usr", "share", "pyload", "locale"), None])
- translation = gettext.translation(name, join(pypath, "locale"),
+ translation = gettext.translation(name, os.path.join(pypath, "locale"),
languages=[locale, default], fallback=True)
except Exception:
print_exc()