Make metadata_overlay use the autocommits attribute of the underlying database.
authorZac Medico <zmedico@gentoo.org>
Sat, 23 Dec 2006 00:21:15 +0000 (00:21 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 23 Dec 2006 00:21:15 +0000 (00:21 -0000)
svn path=/main/trunk/; revision=5357

pym/cache/metadata_overlay.py

index fc99b40110762210fc17bb00587a9ab89f533afd..914285b3d2d54d883023a8250767b36d9ec72567 100644 (file)
@@ -12,7 +12,6 @@ from cache.metadata import database as db_ro
 
 class database(template.database):
 
-       autocommits = True
        serialize_eclasses = False
 
        def __init__(self, location, label, auxdbkeys, db_rw=db_rw, db_ro=db_ro,
@@ -20,6 +19,7 @@ class database(template.database):
                super(database, self).__init__(location, label, auxdbkeys)
                self.db_rw = db_rw(location, label, auxdbkeys, **config)
                self.commit = self.db_rw.commit
+               self.autocommits = self.db_rw.autocommits
                if isinstance(db_ro, type):
                        ro_config = config.copy()
                        ro_config["readonly"] = True