From ecf8077eb8eae78443471de2564cd7e61c8062d6 Mon Sep 17 00:00:00 2001 From: Christophe Benz Date: Wed, 11 Aug 2010 16:39:26 +0200 Subject: [PATCH] add __str__ methods --- weboob/capabilities/base.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/weboob/capabilities/base.py b/weboob/capabilities/base.py index 4caebf52..51c85b57 100644 --- a/weboob/capabilities/base.py +++ b/weboob/capabilities/base.py @@ -20,6 +20,9 @@ __all__ = ['IBaseCap', 'NotLoaded', 'LoadingError'] class NotLoadedMeta(type): + def __str__(self): + return unicode(self).decode('utf-8') + def __unicode__(self): return u'Not loaded' @@ -29,6 +32,9 @@ class NotLoaded(object): class LoadingErrorMeta(type): + def __str__(self): + return unicode(self).decode('utf-8') + def __unicode__(self): return u'Loading error'