server/schemaserial.py
branchstable
changeset 7677 134613d3b353
parent 7543 570522300e22
child 7815 2a164a9cf81c
--- a/server/schemaserial.py	Wed Jul 20 14:09:42 2011 +0200
+++ b/server/schemaserial.py	Wed Jul 20 18:22:41 2011 +0200
@@ -88,7 +88,7 @@
     repo = session.repo
     dbhelper = repo.system_source.dbhelper
     # XXX bw compat (3.6 migration)
-    sqlcu = session.pool['system']
+    sqlcu = session.cnxset['system']
     sqlcu.execute("SELECT * FROM cw_CWRType WHERE cw_name='symetric'")
     if sqlcu.fetchall():
         sql = dbhelper.sql_rename_col('cw_CWRType', 'cw_symetric', 'cw_symmetric',
@@ -138,8 +138,8 @@
             except:
                 pass
             tocleanup = [eid]
-            tocleanup += (eid for eid, (eidetype, uri, extid) in repo._type_source_cache.items()
-                          if etype == eidetype)
+            tocleanup += (eid for eid, cached in repo._type_source_cache.iteritems()
+                          if etype == cached[0])
             repo.clear_caches(tocleanup)
             session.commit(False)
             if needcopy: