[sugar] Possible presence service bug
Ian Bicking
ianb at colorstudy.com
Fri Oct 6 12:24:31 EDT 2006
Marco Pesenti Gritti wrote:
> raise ValueError("address must be a unicode string.")
> ValueError: address must be a unicode string.
In cases like these, I always raise the exception like:
if not isinstance(address, unicode):
raise ValueError("address must be a unicode string, not %r" % address)
This tends to make tracebacks much more useful.
--
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org
More information about the Sugar
mailing list