when reading the schema while adding/removing cubes, read schema in non-strict mode tls-sprint
authorsylvain.thenault@logilab.fr
Tue, 10 Mar 2009 19:35:38 +0100
branchtls-sprint
changeset 1036 593df4919845
parent 1035 776a700560e9
child 1037 1f3fae8d82b2
when reading the schema while adding/removing cubes, read schema in non-strict mode
server/migractions.py
--- a/server/migractions.py	Tue Mar 10 19:35:15 2009 +0100
+++ b/server/migractions.py	Tue Mar 10 19:35:38 2009 +0100
@@ -283,7 +283,7 @@
         if not update_database:
             self.commit()
             return
-        newcubes_schema = self.config.load_schema()
+        newcubes_schema = self.config.load_schema(construction_mode='non-strict')
         new = set()
         # execute pre-create files
         for pack in reversed(newcubes):
@@ -317,9 +317,8 @@
         removedcubes = super(ServerMigrationHelper, self).cmd_remove_cube(cube)
         if not removedcubes:
             return
-        print removedcubes
         fsschema = self.fs_schema
-        removedcubes_schema = self.config.load_schema()
+        removedcubes_schema = self.config.load_schema(construction_mode='non-strict')
         reposchema = self.repo.schema
         # execute pre-remove files
         for pack in reversed(removedcubes):
@@ -1075,7 +1074,6 @@
             if not self._h.confirm('execute rql: %s ?' % msg):
                 raise StopIteration
         try:
-            #print rql, kwargs
             rset = self._h.rqlcursor.execute(rql, kwargs)
         except Exception, ex:
             if self._h.confirm('error: %s\nabort?' % ex):