changeset 3264:9896589487ae

tools (common/data_objects): added __iter__ to Identities
author Goffi <goffi@goffi.org>
date Sat, 25 Apr 2020 15:54:26 +0200
parents e81ad34e8af8
children 1649bbe8d07e
files sat/tools/common/data_objects.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat/tools/common/data_objects.py	Mon Apr 20 14:52:57 2020 +0200
+++ b/sat/tools/common/data_objects.py	Sat Apr 25 15:54:26 2020 +0200
@@ -379,10 +379,13 @@
             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]