From fb0e4dc7a193e4ffefd8ff4ff69e72aa0aa33323 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Wed, 8 Apr 2015 23:20:59 +0200 Subject: [PATCH] models: Assign slots from fields --- mopidy/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mopidy/models.py b/mopidy/models.py index bd449a89..3dd2c67c 100644 --- a/mopidy/models.py +++ b/mopidy/models.py @@ -145,8 +145,8 @@ class ImmutableObjectMeta(type): value._name = key attrs['_fields'] = fields + attrs['__slots__'] = fields.values() attrs['_instances'] = weakref.WeakValueDictionary() - attrs['__slots__'] = ['_' + field for field in fields] for base in bases: if '__weakref__' in getattr(base, '__slots__', []):