From 2242166c78092fa0d80e7bc86aa8c5c1b09e8cef Mon Sep 17 00:00:00 2001 From: Konstantin Stepanov Date: Sat, 11 Dec 2010 00:30:43 +0200 Subject: [PATCH] Commands class is iteratable now --- dbuscron/command.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dbuscron/command.py b/dbuscron/command.py index e05a948..776d474 100644 --- a/dbuscron/command.py +++ b/dbuscron/command.py @@ -49,6 +49,10 @@ class Commands(object): __commands = {} __environ = {} + def __iter__(self): + for m, c in self.__commands.iteritems(): + yield m, c + def _get_environ(self): return self.__environ -- 1.7.9.5