提交 0d4f6d79 编写于 作者: M Mark Hymers

change to not using autocommit by default

Signed-off-by: NMark Hymers <mhy@debian.org>
上级 1fea5f7c
......@@ -92,7 +92,6 @@ def __architecture_add(d, args):
if not dryrun:
try:
s = d.session()
s.begin()
a = Architecture()
a.arch_string = str(args[2]).lower()
a.description = str(args[3])
......@@ -119,7 +118,6 @@ def __architecture_rm(d, args):
if not dryrun:
try:
s = d.session()
s.begin()
a = get_architecture(args[2].lower(), s)
if a is None:
die("E: Cannot find architecture %s" % args[2])
......@@ -182,7 +180,6 @@ def __suite_architecture_add(d, args):
if not dryrun:
try:
s.begin()
sa = SuiteArchitecture()
sa.arch_id = arch.arch_id
sa.suite_id = suite.suite_id
......@@ -203,7 +200,6 @@ def __suite_architecture_rm(d, args):
s = d.session()
if not dryrun:
try:
s.begin()
sa = get_suite_architecture(args[2].lower(), args[3].lower(), s)
if sa is None:
die("E: can't find suite-architecture entry for %s, %s" % (args[2].lower(), args[3].lower()))
......
......@@ -800,7 +800,7 @@ class DBConn(Singleton):
self.db_meta.bind = self.db_pg
self.db_smaker = sessionmaker(bind=self.db_pg,
autoflush=True,
autocommit=True)
autocommit=False)
self.__setuptables()
self.__setupmappers()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册