Explorar o código

Iterate through items

Michael Schwarz %!s(int64=8) %!d(string=hai) anos
pai
achega
2e772f546a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      modules/ffpb.py

+ 1 - 1
modules/ffpb.py

@@ -646,7 +646,7 @@ def ffpb_fetch_stats(bot, url, memoryid):
     nodes_total = 0
     clients_count = 0
 
-    for node in data['nodes']:
+    for key,node in data['nodes'].iteritems():
         if node['flags']['gateway'] or (node['flags'].has_key('client') and node['flags']['client']):
             continue