tools (common/data_objects): added __iter__ to Identities

This commit is contained in:
Goffi 2020-04-25 15:54:26 +02:00
commit a5aac84c6a

View file

@ -379,10 +379,13 @@ class Identity(object):
raise AttributeError(key)
class Identities(object):
class Identities:
def __init__(self):
self.identities = {}
def __iter__(self):
return iter(self.identities)
def __getitem__(self, jid_str):
try:
return self.identities[jid_str]