[dataimport] remove eid_key deprecation warning and prints stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 03 Mar 2011 12:55:29 +0100
branchstable
changeset 7033 ddc1b4d80dbd
parent 7032 b712477ae286
child 7034 1ac9715876e3
[dataimport] remove eid_key deprecation warning and prints
dataimport.py
--- a/dataimport.py	Mon Feb 28 14:14:19 2011 +0100
+++ b/dataimport.py	Thu Mar 03 12:55:29 2011 +0100
@@ -339,6 +339,7 @@
     def rql(self, *args):
         if self._rql is not None:
             return self._rql(*args)
+        return []
 
     @property
     def nb_inserted_entities(self):
@@ -470,7 +471,7 @@
         eid_from, rtype, eid_to = super(RQLObjectStore, self).relate(
             eid_from, rtype, eid_to)
         self.rql('SET X %s Y WHERE X eid %%(x)s, Y eid %%(y)s' % rtype,
-                  {'x': int(eid_from), 'y': int(eid_to)}, ('x', 'y'))
+                 {'x': int(eid_from), 'y': int(eid_to)})
 
 
 # the import controller ########################################################
@@ -513,7 +514,6 @@
             traceback.print_exc(file=tmp)
         else:
             traceback.print_exception(type, value, tb, file=tmp)
-        print tmp.getvalue()
         # use a list to avoid counting a <nb lines> errors instead of one
         errorlog = self.errors.setdefault(key, [])
         if msg is None: