diff --git a/tiramisu_api/api.py b/tiramisu_api/api.py index 172219d..a7122e3 100644 --- a/tiramisu_api/api.py +++ b/tiramisu_api/api.py @@ -819,7 +819,7 @@ class Config: root_path = subpath schema = schema['properties'].get(root_path) if schema is None: - raise AttributeError(_(f'option "{subpath}" inconnue dans l\'optiondescription "{current_subpath}"')) + raise AttributeError(_('option "{0}" inconnue dans l\'optiondescription "{1}"').format(subpath, current_subpath)) current_subpath = subpath return schema diff --git a/tiramisu_api/error.py b/tiramisu_api/error.py index c015478..ed45210 100644 --- a/tiramisu_api/error.py +++ b/tiramisu_api/error.py @@ -1,6 +1,6 @@ try: from tiramisu.error import APIError, ValueWarning, ValueOptionError, ValueErrorWarning, PropertiesOptionError, ConfigError, display_list -except (ModuleNotFoundError, ImportError): +except ImportError: import weakref from .i18n import _ diff --git a/tiramisu_api/i18n.py b/tiramisu_api/i18n.py index a2f02d6..db19aad 100644 --- a/tiramisu_api/i18n.py +++ b/tiramisu_api/i18n.py @@ -1,6 +1,6 @@ try: from tiramisu.i18n import _ -except ModuleNotFoundError: +except ImportError: # FIXME def _(val): return val diff --git a/tiramisu_api/setting.py b/tiramisu_api/setting.py index 4a39241..d1731cb 100644 --- a/tiramisu_api/setting.py +++ b/tiramisu_api/setting.py @@ -1,6 +1,6 @@ try: from tiramisu.setting import undefined -except ModuleNotFoundError: +except ImportError: class Undefined(object): def __str__(self): return 'Undefined'