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
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

View File

@ -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 _

View File

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

View File

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