Browse Source

fix gateway=null

Sunz3r 7 years ago
parent
commit
272ab7e6b1
1 changed files with 5 additions and 1 deletions
  1. 5 1
      ext-respondd.py

+ 5 - 1
ext-respondd.py

@@ -339,7 +339,6 @@ def createNodeinfo():
 def createStatistics():
     j = {
         "node_id": getNode_ID(),
-        "gateway" : getGateway(),
         "clients":  getClients(),
         "traffic": getTraffic(),
         "idletime": float(open('/proc/uptime').read().split(' ')[1]),
@@ -355,6 +354,11 @@ def createStatistics():
             },
         },
     }
+
+    gateway = getGateway()
+    if gateway != None:
+        j["gateway"] = gateway
+    
     return j
 
 def createNeighbours():