diff options
| author | 2015-05-12 02:00:28 +0200 | |
|---|---|---|
| committer | 2015-05-12 03:22:29 +0200 | |
| commit | 0349b81a10d2937897f30031c4dedb49aa132d8c (patch) | |
| tree | 3db2827cd64888cc013e064d4e201b8a6ddbc7a9 /pyload/utils | |
| parent | Merge pull request #12 from GammaC0de/GammaC0de-fix-api (diff) | |
| download | pyload-0349b81a10d2937897f30031c4dedb49aa132d8c.tar.xz | |
'from os' -> 'import os' and so on...
Diffstat (limited to 'pyload/utils')
| -rw-r--r-- | pyload/utils/__init__.py | 8 | 
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()  | 
