mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
fix linter
This commit is contained in:
parent
9f69f04e3f
commit
7fed0e5051
3 changed files with 3 additions and 1 deletions
|
@ -564,6 +564,7 @@ class ActionsMap(object):
|
||||||
func = getattr(mod, func_name)
|
func = getattr(mod, func_name)
|
||||||
except (AttributeError, ImportError):
|
except (AttributeError, ImportError):
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
logger.exception("unable to load function %s.%s", namespace, func_name)
|
logger.exception("unable to load function %s.%s", namespace, func_name)
|
||||||
raise MoulinetteError("error_see_log")
|
raise MoulinetteError("error_see_log")
|
||||||
|
|
|
@ -362,6 +362,7 @@ class _CallbackAction(argparse.Action):
|
||||||
func = getattr(mod, func_name)
|
func = getattr(mod, func_name)
|
||||||
except (AttributeError, ImportError):
|
except (AttributeError, ImportError):
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
raise ValueError("unable to import method {0}".format(self.callback_method))
|
raise ValueError("unable to import method {0}".format(self.callback_method))
|
||||||
self._callback = func
|
self._callback = func
|
||||||
|
|
|
@ -175,7 +175,7 @@ def get_locale():
|
||||||
except Exception:
|
except Exception:
|
||||||
# In some edge case the locale lib fails ...
|
# 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
|
# 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:
|
if not lang:
|
||||||
return ""
|
return ""
|
||||||
return lang[:2]
|
return lang[:2]
|
||||||
|
|
Loading…
Add table
Reference in a new issue