--- a/devtools/dataimport.py Fri Sep 25 11:01:23 2009 +0200
+++ b/devtools/dataimport.py Fri Sep 25 20:49:41 2009 +0200
@@ -151,7 +151,7 @@
return len(self.items) - 1
def add(self, type, item):
- assert isinstance(item, dict), item
+ assert isinstance(item, dict), 'item is not a dict but a %s' % type(item)
eid = item['eid'] = self._put(type, item)
self.eids[eid] = item
self.types.setdefault(type, []).append(eid)
@@ -172,7 +172,7 @@
def get_one(self, name, key):
eids = self.indexes[name].get(key, [])
- assert len(eids) == 1
+ assert len(eids) == 1, 'expected a single one got %i' % len(eids)
return eids[0]
def find(self, type, key, value):