services/presence/buddy.py: Don't allow the Owner to disappear, even if they have no handles left

This commit is contained in:
Simon McVittie 2007-05-22 16:30:02 +01:00
parent a6e809a9ef
commit 10e1daf8c6

View File

@ -266,7 +266,8 @@ class Buddy(ExportedGObject):
del self.handles[tp_client] del self.handles[tp_client]
self.TelepathyHandleRemoved(conn.service_name, conn.object_path, self.TelepathyHandleRemoved(conn.service_name, conn.object_path,
handle) handle)
if not self.handles: # the Owner can't disappear - that would be silly
if not self.handles and not self._owner:
self.emit('disappeared') self.emit('disappeared')
else: else:
_logger.debug('Telepathy handle %u supposedly removed, but ' _logger.debug('Telepathy handle %u supposedly removed, but '