diff mbox series

rteval: services: Iterate through items in MakeReport

Message ID 20210915121432.5472-1-jkacur@redhat.com
State New
Headers show
Series rteval: services: Iterate through items in MakeReport | expand

Commit Message

John Kacur Sept. 15, 2021, 12:14 p.m. UTC
Iterate through items instead of keys in MakeReport.

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 rteval/sysinfo/services.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/rteval/sysinfo/services.py b/rteval/sysinfo/services.py
index 283109b9b234..e5de22efc342 100644
--- a/rteval/sysinfo/services.py
+++ b/rteval/sysinfo/services.py
@@ -111,10 +111,10 @@  class SystemServices:
         rep_n = libxml2.newNode("Services")
         rep_n.newProp("init", self.__init)
 
-        for s in srvs:
+        for service, val in srvs.items():
             srv_n = libxml2.newNode("Service")
-            srv_n.newProp("state", srvs[s])
-            srv_n.addContent(s)
+            srv_n.newProp("state", val)
+            srv_n.addContent(service)
             rep_n.addChild(srv_n)
 
         return rep_n