finally
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 19 Oct 2009 20:01:14 +0200
changeset 3737 e8c669e33689
parent 3735 80fb4083c29b
child 3738 89871767fa82
finally
server/schemaserial.py
--- a/server/schemaserial.py	Mon Oct 19 18:15:45 2009 +0200
+++ b/server/schemaserial.py	Mon Oct 19 20:01:14 2009 +0200
@@ -277,7 +277,7 @@
     """synchronize schema and permissions in the database according to
     current schema
     """
-    quiet = not os.environ['APYCOT_ROOT']
+    quiet = os.environ.get('APYCOT_ROOT')
     if not quiet:
         _title = '-> storing the schema in the database '
         print _title,
@@ -299,7 +299,8 @@
     for ertype in aller:
         # skip eid and has_text relations
         if ertype in VIRTUAL_RTYPES:
-            pb.update()
+            if pb is not None:
+                pb.update()
             continue
         for rql, kwargs in erschema2rql(schema[ertype]):
             if verbose: