fix linter

This commit is contained in:
Kay0u 2020-05-12 19:13:37 +02:00
parent 9f69f04e3f
commit 7fed0e5051
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D
3 changed files with 3 additions and 1 deletions

View file

@ -564,6 +564,7 @@ class ActionsMap(object):
func = getattr(mod, func_name)
except (AttributeError, ImportError):
import traceback
traceback.print_exc()
logger.exception("unable to load function %s.%s", namespace, func_name)
raise MoulinetteError("error_see_log")

View file

@ -362,6 +362,7 @@ class _CallbackAction(argparse.Action):
func = getattr(mod, func_name)
except (AttributeError, ImportError):
import traceback
traceback.print_exc()
raise ValueError("unable to import method {0}".format(self.callback_method))
self._callback = func

View file

@ -175,7 +175,7 @@ def get_locale():
except Exception:
# In some edge case the locale lib fails ...
# c.f. https://forum.yunohost.org/t/error-when-trying-to-enter-user-information-in-admin-panel/11390/11
lang = os.getenv('LANG')
lang = os.getenv("LANG")
if not lang:
return ""
return lang[:2]