python 3.5 support

This commit is contained in:
Emmanuel Garette 2019-08-22 15:51:30 +02:00
parent 0dc298dedc
commit 039e2e6b7b
4 changed files with 4 additions and 4 deletions

View File

@ -819,7 +819,7 @@ class Config:
root_path = subpath root_path = subpath
schema = schema['properties'].get(root_path) schema = schema['properties'].get(root_path)
if schema is None: 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 current_subpath = subpath
return schema return schema

View File

@ -1,6 +1,6 @@
try: try:
from tiramisu.error import APIError, ValueWarning, ValueOptionError, ValueErrorWarning, PropertiesOptionError, ConfigError, display_list from tiramisu.error import APIError, ValueWarning, ValueOptionError, ValueErrorWarning, PropertiesOptionError, ConfigError, display_list
except (ModuleNotFoundError, ImportError): except ImportError:
import weakref import weakref
from .i18n import _ from .i18n import _

View File

@ -1,6 +1,6 @@
try: try:
from tiramisu.i18n import _ from tiramisu.i18n import _
except ModuleNotFoundError: except ImportError:
# FIXME # FIXME
def _(val): def _(val):
return val return val

View File

@ -1,6 +1,6 @@
try: try:
from tiramisu.setting import undefined from tiramisu.setting import undefined
except ModuleNotFoundError: except ImportError:
class Undefined(object): class Undefined(object):
def __str__(self): def __str__(self):
return 'Undefined' return 'Undefined'