]> git.decadent.org.uk Git - dak.git/commitdiff
change to not using autocommit by default
authorMark Hymers <mhy@debian.org>
Fri, 1 May 2009 22:56:48 +0000 (23:56 +0100)
committerMark Hymers <mhy@debian.org>
Sun, 9 Aug 2009 15:49:20 +0000 (16:49 +0100)
Signed-off-by: Mark Hymers <mhy@debian.org>
dak/admin.py
daklib/dbconn.py

index 2bf6161724d93f2b3f743170d0e1a7513886c675..1cf80f2855a414d858fb1a7777a2101c9d5a2ccf 100755 (executable)
@@ -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()))
index f1a23c51ba98fc91574838ca2bdb5d3131bfb970..781e648719a8957d87893fcea07d9334c2f1d406 100755 (executable)
@@ -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()