services/presence/presenceservice: check against None with 'is'
This commit is contained in:
parent
0410ed28ba
commit
7b20bacdf5
@ -236,11 +236,11 @@ class PresenceService(ExportedGObject):
|
|||||||
for act in activities_joined:
|
for act in activities_joined:
|
||||||
_logger.debug("Handle %s joined activity %s", contact_handle, act)
|
_logger.debug("Handle %s joined activity %s", contact_handle, act)
|
||||||
activity = self._activities.get(act)
|
activity = self._activities.get(act)
|
||||||
if not activity:
|
if activity is None:
|
||||||
# new activity, can fail
|
# new activity, can fail
|
||||||
activity = self._new_activity(act, tp)
|
activity = self._new_activity(act, tp)
|
||||||
|
|
||||||
if activity:
|
if activity is not None:
|
||||||
activity.buddy_joined(buddy)
|
activity.buddy_joined(buddy)
|
||||||
buddy.add_activity(activity)
|
buddy.add_activity(activity)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user