From c728dfa774cff020bc4317918b8a684c475bd63d Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Thu, 8 Nov 2012 10:38:26 +0100 Subject: [PATCH] Declare fields to avoid warnings Also call the init of CapBaseObject. This should have been done previously, though the usage of id=None isn't ideal. Maybe it should be split_path. --- weboob/capabilities/collection.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/weboob/capabilities/collection.py b/weboob/capabilities/collection.py index f7548136..61b4d67b 100644 --- a/weboob/capabilities/collection.py +++ b/weboob/capabilities/collection.py @@ -18,7 +18,7 @@ # along with weboob. If not, see . -from .base import IBaseCap, CapBaseObject, UserError +from .base import IBaseCap, CapBaseObject, UserError, StringField, Field __all__ = ['ICapCollection', 'BaseCollection', 'Collection', 'CollectionNotFound'] @@ -39,6 +39,7 @@ class BaseCollection(CapBaseObject): However, this probably will not work properly for now. """ def __init__(self, split_path): + CapBaseObject.__init__(self, None) self.split_path = split_path @property @@ -64,6 +65,9 @@ class Collection(BaseCollection): Do not inherit from this class if you want to make a regular CapBaseObject a Collection, use BaseCollection instead. """ + title = StringField('Collection title') + split_path = Field('Full collection path', list) + def __init__(self, split_path, title=None): self.title = title BaseCollection.__init__(self, split_path)