From 7e7012ccd4b406c1db40f34f7d6f152cfa9c4f3c Mon Sep 17 00:00:00 2001 From: helmutm Date: Sun, 10 Aug 2008 09:37:48 +0000 Subject: [PATCH] fix attribute handling - no class attributes on classes that should be usable as adapters git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2800 fd906abe-77d9-0310-91a1-e0d9ade77398 --- commerce/base.py | 5 +---- commerce/product.py | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/commerce/base.py b/commerce/base.py index 08ee9d7..76336e0 100644 --- a/commerce/base.py +++ b/commerce/base.py @@ -31,12 +31,9 @@ class Shop(object): implements(IShop) - title = u'Shop' - def __init__(self, name, title=None): self.name = name - if title is not None: - self.title = title + self.title = title or u'Shop' self.products = {} def addProduct(self, product): diff --git a/commerce/product.py b/commerce/product.py index cfa8a5c..6fca2fb 100644 --- a/commerce/product.py +++ b/commerce/product.py @@ -31,11 +31,8 @@ class Product(object): implements(IProduct) - title = u'Product' - def __init__(self, name, title=None): self.name = name - if title is not None: - self.title = title + self.title = title or u'Product' self.shops = {}