From d6a87a9567083732fb0f8d10aa69eee8ea95b8da Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Tue, 25 Mar 2008 19:04:33 +0000 Subject: [PATCH] prevent multiple auto-interests per DC class --- direct/src/distributed/DistributedObject.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/direct/src/distributed/DistributedObject.py b/direct/src/distributed/DistributedObject.py index 53ccf12b92..f796d8093a 100644 --- a/direct/src/distributed/DistributedObject.py +++ b/direct/src/distributed/DistributedObject.py @@ -125,6 +125,12 @@ class DistributedObject(DistributedObjectBase): cls.autoInterests = autoInterests return set(autoInterests) autoInterests = _getAutoInterests(self.__class__) + # if the server starts supporting multiple auto-interest per class, this check + # should be removed + if len(autoInterests) > 1: + self.notify.error( + 'only one auto-interest allowed per DC class, %s has %s autoInterests (%s)' % + (self.dclass.getName(), len(autoInterests), list(autoInterests))) _getAutoInterests = None return list(autoInterests)