# HG changeset patch # User Nicolas Chauvat # Date 1253904581 -7200 # Node ID ea6bf6f9ba0c4eccecd4c708fa95d446463342f2 # Parent c9c8b231db7bb8c87b32e52d493f92738f71c6db [cwctl] improve dialog messages diff -r c9c8b231db7b -r ea6bf6f9ba0c cwctl.py --- a/cwctl.py Fri Sep 25 11:01:23 2009 +0200 +++ b/cwctl.py Fri Sep 25 20:49:41 2009 +0200 @@ -171,8 +171,7 @@ """run the command with its specific arguments""" if args: raise BadCommandUsage('Too much arguments') - print 'CubicWeb version:', cwcfg.cubicweb_version() - print 'Detected mode:', cwcfg.mode + print 'CubicWeb %s (%s mode)' % (cwcfg.cubicweb_version(), cwcfg.mode) print print 'Available configurations:' for config in CONFIGURATIONS: diff -r c9c8b231db7b -r ea6bf6f9ba0c devtools/dataimport.py --- 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):