tools (common/data_objects): added __iter__ to Identities
This commit is contained in:
parent
ee53fae57b
commit
a5aac84c6a
1 changed files with 4 additions and 1 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Reference in a new issue