From a5aac84c6aae85d2389775ba0b4268b35ff9042f Mon Sep 17 00:00:00 2001 From: Goffi Date: Sat, 25 Apr 2020 15:54:26 +0200 Subject: [PATCH] tools (common/data_objects): added __iter__ to Identities --- sat/tools/common/data_objects.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sat/tools/common/data_objects.py b/sat/tools/common/data_objects.py index 350a1549..3a264749 100644 --- a/sat/tools/common/data_objects.py +++ b/sat/tools/common/data_objects.py @@ -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]