server/sqlutils.py
branchstable
changeset 2396 8bfb99d7bbcc
parent 1977 606923dff11b
child 2493 9806571ea790
--- a/server/sqlutils.py	Sat Jul 18 22:58:30 2009 +0200
+++ b/server/sqlutils.py	Sun Jul 19 16:10:59 2009 +0200
@@ -29,7 +29,7 @@
 SQL_PREFIX = 'cw_'
 
 
-def sqlexec(sqlstmts, cursor_or_execute, withpb=True, delimiter=';'):
+def sqlexec(sqlstmts, cursor_or_execute, withpb=True, pbtitle='', delimiter=';'):
     """execute sql statements ignoring DROP/ CREATE GROUP or USER statements
     error. If a cnx is given, commit at each statement
     """
@@ -39,7 +39,7 @@
         execute = cursor_or_execute
     sqlstmts = sqlstmts.split(delimiter)
     if withpb:
-        pb = ProgressBar(len(sqlstmts))
+        pb = ProgressBar(len(sqlstmts), title=pbtitle)
     for sql in sqlstmts:
         sql = sql.strip()
         if withpb: