set not loaded fields to NotAvailable

This commit is contained in:
Christophe Benz 2010-08-12 17:33:43 +02:00 committed by Romain Bignon
commit 87f34c1961
2 changed files with 14 additions and 9 deletions

View file

@ -18,7 +18,20 @@
from weboob.tools.misc import iter_fields
__all__ = ['IBaseCap', 'NotLoaded', 'LoadingError', 'CapBaseObject']
__all__ = ['IBaseCap', 'NotAvailable', 'NotLoaded', 'CapBaseObject']
class NotAvailableMeta(type):
def __str__(self):
return unicode(self).decode('utf-8')
def __unicode__(self):
return u'Not available'
class NotAvailable(object):
__metaclass__ = NotAvailableMeta
class NotLoadedMeta(type):
@ -33,18 +46,6 @@ class NotLoaded(object):
__metaclass__ = NotLoadedMeta
class LoadingErrorMeta(type):
def __str__(self):
return unicode(self).decode('utf-8')
def __unicode__(self):
return u'Loading error'
class LoadingError(object):
__metaclass__ = LoadingErrorMeta
class IBaseCap(object):
pass