services/presence/presenceservice: check against None with 'is'

This commit is contained in:
Simon McVittie 2007-05-24 18:11:43 +01:00
parent 0410ed28ba
commit 7b20bacdf5

View File

@ -236,11 +236,11 @@ class PresenceService(ExportedGObject):
for act in activities_joined:
_logger.debug("Handle %s joined activity %s", contact_handle, act)
activity = self._activities.get(act)
if not activity:
if activity is None:
# new activity, can fail
activity = self._new_activity(act, tp)
if activity:
if activity is not None:
activity.buddy_joined(buddy)
buddy.add_activity(activity)