[db-fti-index] simple fix fpr progressbar-related crash when etypes is None in reindex_entities() stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Tue, 17 Aug 2010 11:06:20 +0200
branchstable
changeset 6112 913979c79244
parent 6111 06c96a79c3c0
child 6113 dbe17a3ebb9f
[db-fti-index] simple fix fpr progressbar-related crash when etypes is None in reindex_entities()
server/checkintegrity.py
--- a/server/checkintegrity.py	Mon Aug 16 12:07:43 2010 +0200
+++ b/server/checkintegrity.py	Tue Aug 17 11:06:20 2010 +0200
@@ -99,8 +99,6 @@
         print 'no text index table'
         dbhelper.init_fti(cursor)
     repo.system_source.do_fti = True  # ensure full-text indexation is activated
-    if withpb:
-        pb = ProgressBar(len(etypes) + 1)
     if etypes is None:
         print 'Reindexing entities'
         etypes = set()
@@ -123,6 +121,7 @@
                                dbhelper.fti_table, dbhelper.fti_uid_attr,
                                ','.join("'%s'" % etype for etype in etypes)))
     if withpb:
+        pb = ProgressBar(len(etypes) + 1)
         pb.update()
     # reindex entities by generating rql queries which set all indexable
     # attribute to their current value