# HG changeset patch # User Sylvain Thénault # Date 1267696708 -3600 # Node ID fdb5476dee9aee375e5ef5030bb350f83fdc278d # Parent 52c81aef0b612c83de61a81373bb84edd81ff521# Parent e46c6e01117b283dc055d07ad12c7ca74be2d68c backport stable diff -r 52c81aef0b61 -r fdb5476dee9a server/schemaserial.py --- a/server/schemaserial.py Thu Mar 04 10:23:20 2010 +0100 +++ b/server/schemaserial.py Thu Mar 04 10:58:28 2010 +0100 @@ -55,6 +55,7 @@ return dict(cursor.execute('Any T, X WHERE X is CWConstraintType, X name T')) # schema / perms deserialization ############################################## + def deserialize_schema(schema, session): """return a schema according to information stored in an rql database as CWRType and CWEType entities @@ -219,9 +220,10 @@ print _title, execute = cursor.unsafe_execute eschemas = schema.entities() - aller = eschemas + schema.relations() if not quiet: - pb_size = len(aller) + len(CONSTRAINTS) + len([x for x in eschemas if x.specializes()]) + pb_size = (len(eschemas + schema.relations()) + + len(CONSTRAINTS) + + len([x for x in eschemas if x.specializes()])) pb = ProgressBar(pb_size, title=_title) else: pb = None @@ -260,7 +262,7 @@ if pb is not None: pb.update() for rql, kwargs in specialize2rql(schema): - assert execute(rql, kwargs, build_descr=False) + execute(rql, kwargs, build_descr=False) if pb is not None: pb.update() if not quiet: diff -r 52c81aef0b61 -r fdb5476dee9a server/test/unittest_schemaserial.py