Fix traceback in RemoveBuddy

This commit is contained in:
Dan Williams 2007-04-23 13:21:19 -04:00
parent 857aa1dcbf
commit 05b7f678e9

View File

@ -283,8 +283,9 @@ class TestPresenceService(dbus.service.Object):
def RemoveBuddy(self, pubkey): def RemoveBuddy(self, pubkey):
pubkey = ''.join([chr(item) for item in pubkey]) pubkey = ''.join([chr(item) for item in pubkey])
if self._buddies.has_key(pubkey): if self._buddies.has_key(pubkey):
del self._buddies[pubkey] buddy = self._buddies[pubkey]
self.BuddyDisappeared(buddy._object_path) self.BuddyDisappeared(buddy._object_path)
del self._buddies[pubkey]
return return
raise NotFoundError("Buddy not found") raise NotFoundError("Buddy not found")