no progress bar in apycot environment stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 16 Nov 2009 10:31:32 +0100
branchstable
changeset 3854 8633cd05b6b5
parent 3853 e8af6f586882
child 3855 dbd37c10f865
no progress bar in apycot environment
server/schemaserial.py
--- a/server/schemaserial.py	Mon Nov 16 09:37:06 2009 +0100
+++ b/server/schemaserial.py	Mon Nov 16 10:31:32 2009 +0100
@@ -7,6 +7,7 @@
 """
 __docformat__ = "restructuredtext en"
 
+import os
 import sys
 from itertools import chain
 
@@ -280,7 +281,7 @@
     print _title,
     eschemas = schema.entities()
     aller = eschemas + schema.relations()
-    if not verbose:
+    if not verbose and not os.environ.get('APYCOT_ROOT'):
         pb_size = len(aller) + len(CONSTRAINTS) + len([x for x in eschemas if x.specializes()])
         pb = ProgressBar(pb_size, title=_title)
     rql = 'INSERT CWConstraintType X: X name %(ct)s'