--- 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: