From 0d4f6d79a7c4f326537d30b21b5fb5852917f2ee Mon Sep 17 00:00:00 2001 From: Mark Hymers Date: Fri, 1 May 2009 23:56:48 +0100 Subject: [PATCH] change to not using autocommit by default Signed-off-by: Mark Hymers --- dak/admin.py | 4 ---- daklib/dbconn.py | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/dak/admin.py b/dak/admin.py index 2bf61617..1cf80f28 100755 --- a/dak/admin.py +++ b/dak/admin.py @@ -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())) diff --git a/daklib/dbconn.py b/daklib/dbconn.py index f1a23c51..781e6487 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -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() -- 2.39.5