[migration] new build_descr argument to rqlexec on the migration helper
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 18 Mar 2010 17:31:22 +0100
changeset 4945 356662a6f06c
parent 4944 65533aee8d0a
child 4951 7dc54e12c606
[migration] new build_descr argument to rqlexec on the migration helper
server/migractions.py
--- a/server/migractions.py	Thu Mar 18 17:28:59 2010 +0100
+++ b/server/migractions.py	Thu Mar 18 17:31:22 2010 +0100
@@ -269,7 +269,7 @@
 
     def rqlexecall(self, rqliter, cachekey=None, ask_confirm=True):
         for rql, kwargs in rqliter:
-            self.rqlexec(rql, kwargs, cachekey, ask_confirm)
+            self.rqlexec(rql, kwargs, cachekey, ask_confirm=ask_confirm)
 
     @cached
     def _create_context(self):
@@ -1199,7 +1199,8 @@
                 # no result to fetch
                 return
 
-    def rqlexec(self, rql, kwargs=None, cachekey=None, ask_confirm=True):
+    def rqlexec(self, rql, kwargs=None, cachekey=None, build_descr=True,
+                ask_confirm=True):
         """rql action"""
         if not isinstance(rql, (tuple, list)):
             rql = ( (rql, kwargs), )
@@ -1212,7 +1213,7 @@
                 msg = rql
             if not ask_confirm or self.confirm('Execute rql: %s ?' % msg):
                 try:
-                    res = execute(rql, kwargs, cachekey)
+                    res = execute(rql, kwargs, cachekey, build_descr=build_descr)
                 except Exception, ex:
                     if self.confirm('Error: %s\nabort?' % ex):
                         raise