Commands class is iteratable now
authorKonstantin Stepanov <kstep@p-nut.info>
Fri, 10 Dec 2010 22:30:43 +0000 (00:30 +0200)
committerKonstantin Stepanov <kstep@p-nut.info>
Fri, 10 Dec 2010 22:30:43 +0000 (00:30 +0200)
dbuscron/command.py

index e05a948..776d474 100644 (file)
@@ -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