--- a/devtools/dataimport.py Wed Aug 26 14:36:00 2009 +0200
+++ b/devtools/dataimport.py Wed Aug 26 19:53:01 2009 +0200
@@ -36,14 +36,9 @@
GENERATORS.append( (gen_users, CHK) )
- # progress callback
- def tell(msg):
- print msg
-
# create controller
ctl = CWImportController(RQLObjectStore())
ctl.askerror = True
- ctl._tell = tell
ctl.generators = GENERATORS
ctl.store._checkpoint = checkpoint
ctl.store._rql = rql
@@ -75,6 +70,9 @@
for row in reader:
yield dict(zip(header, row))
+def tell(msg):
+ print msg
+
# base sanitizing functions #####
def capitalize_if_unicase(txt):
@@ -219,6 +217,7 @@
self.data = {}
self.errors = None
self.askerror = False
+ self._tell = tell
def check(self, type, key, value):
self._checks.setdefault(type, {}).setdefault(key, []).append(value)