This commit is contained in:
Emmanuel Garette 2018-09-29 21:39:58 +02:00
parent 77e4fff763
commit 69da6ed5e6
5 changed files with 9 additions and 9 deletions

View File

@ -824,7 +824,7 @@ class KernelGroupConfig(_CommonConfig):
"""Setattr not in current KernelGroupConfig, but in each children """Setattr not in current KernelGroupConfig, but in each children
""" """
ret = [] ret = []
if isinstance(self, KernelGroupConfig): if self.impl_type == 'group':
commit = True commit = True
else: else:
#Commit only one time #Commit only one time
@ -864,7 +864,7 @@ class KernelGroupConfig(_CommonConfig):
err._orig_opt)) err._orig_opt))
except (ValueError, SlaveError) as err: except (ValueError, SlaveError) as err:
ret.append(err) ret.append(err)
if _commit and not isinstance(self, KernelGroupConfig): if _commit and self.impl_type != 'group':
self.cfgimpl_get_values()._p_.commit() self.cfgimpl_get_values()._p_.commit()
return ret return ret

View File

@ -133,7 +133,7 @@ def delete_session(session_id): # pragma: optional cover
session = storage_module.storage.getsession() session = storage_module.storage.getsession()
storage_module.value.delete_session(session_id) storage_module.value.delete_session(session_id)
storage_module.storage.delete_session(session_id) storage_module.storage.delete_session(session_id)
if session: if session: # pragma: no cover
session.commit() session.commit()
del(session) del(session)

View File

@ -113,7 +113,7 @@ class Storage(object):
try: try:
self.execute('INSERT INTO session(session, persistent) VALUES (?, ?)', self.execute('INSERT INTO session(session, persistent) VALUES (?, ?)',
(session_id, persistent)) (session_id, persistent))
except sqlite3.IntegrityError: except sqlite3.IntegrityError: # pragma: no cover
raise ConflictError(_('session "{}" already used').format(session_id)) raise ConflictError(_('session "{}" already used').format(session_id))
self.session_id = self._cursor.lastrowid self.session_id = self._cursor.lastrowid
self.created = True self.created = True

View File

@ -172,7 +172,7 @@ class Values(Sqlite3DB):
# autocreate owners # autocreate owners
try: try:
nowner = getattr(owners, owner[0]) nowner = getattr(owners, owner[0])
except AttributeError: except AttributeError: # pragma: no cover
owners.addowner(owner[0]) owners.addowner(owner[0])
nowner = getattr(owners, owner[0]) nowner = getattr(owners, owner[0])
if not with_value: if not with_value: