From 16b00948218c17088ec869ff6205374b450b64bd Mon Sep 17 00:00:00 2001 From: Christophe Benz Date: Thu, 12 Aug 2010 17:08:17 +0200 Subject: [PATCH] check type instead of instance --- weboob/tools/backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weboob/tools/backend.py b/weboob/tools/backend.py index e1c8ae20..abe00900 100644 --- a/weboob/tools/backend.py +++ b/weboob/tools/backend.py @@ -218,7 +218,7 @@ class BaseBackend(object): if not missing_fields: return obj - assert obj in self.OBJECTS, 'The object of type %s is not supported by the backend %s' % (type(obj), self) + assert type(obj) in self.OBJECTS, 'The object of type %s is not supported by the backend %s' % (type(obj), self) for key, value in self.OBJECTS.iteritems(): if isinstance(obj, key):