[POS-commit] r6431 - stoqlib/trunk/stoqlib/database

Johan Dahlin jdahlin at async.com.br
Wed Apr 25 15:32:27 BRT 2007


Author: jdahlin
Date: Wed Apr 25 15:32:27 2007
New Revision: 6431

Modified:
   stoqlib/trunk/stoqlib/database/runtime.py

Log:
Improve exception message

Modified: stoqlib/trunk/stoqlib/database/runtime.py
==============================================================================
--- stoqlib/trunk/stoqlib/database/runtime.py	(original)
+++ stoqlib/trunk/stoqlib/database/runtime.py	Wed Apr 25 15:32:27 2007
@@ -94,7 +94,7 @@
 
     def get(self, obj):
         if not isinstance(obj, (SQLObject, InheritableSQLObject)):
-            raise TypeError("obj must be a SQLObject")
+            raise TypeError("obj must be a SQLObject, not %r" % (obj,))
 
         table = type(obj)
         return table.get(obj.id, connection=self)


More information about the POS-commit mailing list