From a6cce50977159291c97bd9703c450ac30921f448 Mon Sep 17 00:00:00 2001 From: Irina LAMBLA Date: Sat, 8 Dec 2018 00:08:07 +0100 Subject: [PATCH] corrections --- moulinette/__init__.py | 2 +- moulinette/core.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/moulinette/__init__.py b/moulinette/__init__.py index 1b1207e6..719c5dd3 100755 --- a/moulinette/__init__.py +++ b/moulinette/__init__.py @@ -137,5 +137,5 @@ def cli(namespaces, args, use_cache=True, output_as=None, except MoulinetteError as e: import logging logging.getLogger(namespaces[0]).error(e.strerror) - return e.errno + return 1 return 0 diff --git a/moulinette/core.py b/moulinette/core.py index ce862e6e..f56ffd21 100644 --- a/moulinette/core.py +++ b/moulinette/core.py @@ -414,8 +414,9 @@ def clean_session(session_id, profiles=[]): class MoulinetteError(StandardError): """Moulinette base exception""" def __init__(self, key, *args, **kwargs): - msg = m18n.g(key, *args, **kwargs) + msg = moulinette.m18n.g(key, *args, **kwargs) super(MoulinetteError, self).__init__(msg) + self.strerror = msg class MoulinetteLock(object):