From c126f738bd5be581d5321521eedc9b14a8165a0e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 May 2015 18:11:25 +0200 Subject: Use 'import' instead 'from' (2) --- pyload/utils/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pyload/utils/__init__.py') 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"), -- cgit v1.2.3