prefix metaconfig_prefix with current name
This commit is contained in:
parent
5ff47ac5c9
commit
82a91db16e
6 changed files with 15 additions and 9 deletions
|
@ -1,3 +1,7 @@
|
|||
Mon Aug 21 14:24:42 2019 +0200 Emmanuel Garette <egarette@cadoles.com>
|
||||
* version 3.0 rc12
|
||||
* prefix metaconfig_prefix with current name
|
||||
|
||||
Mon Aug 19 08:02:27 2019 +0200 Emmanuel Garette <egarette@cadoles.com>
|
||||
* version 3.0 rc11
|
||||
* Config could have multiple parents
|
||||
|
|
|
@ -45,4 +45,4 @@ allfuncs.extend(all_options)
|
|||
del(all_options)
|
||||
__all__ = tuple(allfuncs)
|
||||
del(allfuncs)
|
||||
__version__ = "3.0rc11"
|
||||
__version__ = "3.0rc12"
|
||||
|
|
|
@ -692,12 +692,14 @@ class _CommonConfig(SubConfig):
|
|||
child.parents.append(weakref.ref(duplicated_config))
|
||||
if self.parents:
|
||||
if deep:
|
||||
if metaconfig_prefix is not None and self._impl_path is not None:
|
||||
metaconfig_prefix += self._impl_path
|
||||
for parent in self.parents:
|
||||
duplicated_config = parent().duplicate(deep=deep,
|
||||
storage=storage,
|
||||
metaconfig_prefix=metaconfig_prefix,
|
||||
child=duplicated_config,
|
||||
persistent=persistent)
|
||||
storage=storage,
|
||||
metaconfig_prefix=metaconfig_prefix,
|
||||
child=duplicated_config,
|
||||
persistent=persistent)
|
||||
else:
|
||||
duplicated_config.parents = self.parents
|
||||
for parent in self.parents:
|
||||
|
|
|
@ -1100,8 +1100,8 @@ msgstr "storage_type est déjà défini, impossible de le redéfinir"
|
|||
|
||||
#: tiramisu/storage/dictionary/storage.py:44
|
||||
#: tiramisu/storage/sqlite3/storage.py:129
|
||||
msgid "session \"{}\" already used"
|
||||
msgstr "session \"{}\" en court d'utilisation"
|
||||
msgid "session \"{}\" already exists"
|
||||
msgstr "la session \"{}\" existe déjà"
|
||||
|
||||
#: tiramisu/storage/dictionary/storage.py:46
|
||||
msgid "a dictionary cannot be persistent"
|
||||
|
|
|
@ -41,7 +41,7 @@ class Storage:
|
|||
|
||||
def __init__(self, session_id, persistent, test=False):
|
||||
if not test and session_id in _list_sessions:
|
||||
raise ConflictError(_('session "{}" already used').format(session_id))
|
||||
raise ConflictError(_('session "{}" already exists').format(session_id))
|
||||
if persistent:
|
||||
raise ValueError(_('a dictionary cannot be persistent'))
|
||||
self.session_id = session_id
|
||||
|
|
|
@ -126,7 +126,7 @@ class Storage(object):
|
|||
self.execute('INSERT INTO session(session, persistent) VALUES (?, ?)',
|
||||
(session_id, persistent))
|
||||
except sqlite3.IntegrityError: # pragma: no cover
|
||||
raise ConflictError(_('session "{}" already used').format(session_id))
|
||||
raise ConflictError(_('session "{}" already exists').format(session_id))
|
||||
self.session_id = self._cursor.lastrowid
|
||||
self.created = True
|
||||
|
||||
|
|
Loading…
Reference in a new issue