diff options
author | 2015-05-01 18:11:25 +0200 | |
---|---|---|
committer | 2015-05-01 18:11:25 +0200 | |
commit | c126f738bd5be581d5321521eedc9b14a8165a0e (patch) | |
tree | 418989bfa81bfd30085f09102df53f6f58b00f14 /pyload/utils | |
parent | Use 'import' instead 'from' (1) (diff) | |
download | pyload-c126f738bd5be581d5321521eedc9b14a8165a0e.tar.xz |
Use 'import' instead 'from' (2)
Diffstat (limited to 'pyload/utils')
-rw-r--r-- | pyload/utils/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pyload/utils/__init__.py b/pyload/utils/__init__.py index da84fe51c..5033780c0 100644 --- a/pyload/utils/__init__.py +++ b/pyload/utils/__init__.py @@ -256,8 +256,10 @@ 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 traceback import print_exc + 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"), |