can load old session

This commit is contained in:
Emmanuel Garette 2020-04-21 19:19:04 +02:00
parent 86a48ce9f1
commit 2d7729612b
1 changed files with 3 additions and 1 deletions

View File

@ -1206,8 +1206,10 @@ class KernelMixConfig(KernelGroupConfig):
storage=None, storage=None,
new=False, new=False,
): ):
if storage is None:
storage = self._storage
if not new: if not new:
if session_id not in [child.impl_getname() for child in self._impl_children]: if session_id not in await list_sessions(storage=storage):
raise ConfigError(_('cannot find existing config with session_id to "{}"').format(session_id)) raise ConfigError(_('cannot find existing config with session_id to "{}"').format(session_id))
assert type_ in ('config', 'metaconfig', 'mixconfig'), _('unknown type {}').format(type_) assert type_ in ('config', 'metaconfig', 'mixconfig'), _('unknown type {}').format(type_)