From 2699d72b523ad3d8a6a6641eff99f9afa1900dcd Mon Sep 17 00:00:00 2001 From: Thor77 Date: Wed, 26 Aug 2015 12:44:56 +0200 Subject: [PATCH] add __iter__ to Clients --- tsstats.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tsstats.py b/tsstats.py index 33d6ad7..306e144 100755 --- a/tsstats.py +++ b/tsstats.py @@ -60,6 +60,12 @@ class Clients: self += id_or_uid return self.clients_by_uid[id_or_uid] + def __iter__(self): + for id_client in self.clients_by_id.values(): + yield id_client + for uid_client in self.clients_by_uid.values(): + yield uid_client + class Client: