From 2e07609d0775ab4b4f2f9f41ae7a94675da594e7 Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Wed, 4 Oct 2006 03:18:28 +0000 Subject: [PATCH] added logging of state reset in history, added isValidInterestHandle --- direct/src/distributed/DoInterestManager.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/direct/src/distributed/DoInterestManager.py b/direct/src/distributed/DoInterestManager.py index e7b543df98..d8ea3d8d64 100755 --- a/direct/src/distributed/DoInterestManager.py +++ b/direct/src/distributed/DoInterestManager.py @@ -127,9 +127,14 @@ class DoInterestManager(DirectObject.DirectObject): DoInterestManager._interests.clear() self._outstandingScopes = set() self._completeEventCount = ScratchPad(num=0) - self._addDebugInterestHistory( - "STATE RESET", "", 0, 0, - 0, []) + self._addDebugInterestHistory("RESET", "", 0, 0, 0, []) + + def isValidInterestHandle(self, handle): + # pass in a handle (or anything else) and this will return true if it is + # still a valid interest handle + if not isinstance(handle, InterestHandle): + return False + return DoInterestManager._interests.has_key(handle.asInt()) def addInterest(self, parentId, zoneIdList, description, event=None, auto=False): """