From 88a899e8b30e11fe10d641394fc5f2b381c1bd41 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sun, 19 Oct 2014 13:09:25 +0200 Subject: [PATCH] fix StatusField to be a BaseObject --- weboob/capabilities/account.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/weboob/capabilities/account.py b/weboob/capabilities/account.py index 0acd88da..cfac8a5d 100644 --- a/weboob/capabilities/account.py +++ b/weboob/capabilities/account.py @@ -18,7 +18,7 @@ # along with weboob. If not, see . -from .base import Capability, BaseObject, StringField, Field, UserError +from .base import Capability, BaseObject, StringField, IntField, Field, UserError __all__ = ['AccountRegisterError', 'Account', 'StatusField', 'CapAccount'] @@ -42,14 +42,20 @@ class Account(BaseObject): BaseObject.__init__(self, id) -class StatusField(object): +class StatusField(BaseObject): """ - Field of an account status. + Field of an account staeobjectus. """ FIELD_TEXT = 0x001 # the value is a long text FIELD_HTML = 0x002 # the value is HTML formated + key = StringField('Key') + label = StringField('Label') + value = StringField('Value') + flags = IntField('Flags') + def __init__(self, key, label, value, flags=0): + super(StatusField, self).__init__(key) self.key = key self.label = label self.value = value