Browse Source

prevent multiple auto-interests per DC class

Darren Ranalli 17 years ago
parent
commit
d6a87a9567
1 changed files with 6 additions and 0 deletions
  1. 6 0
      direct/src/distributed/DistributedObject.py

+ 6 - 0
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)