// Get the previous info already stored
data = self.getIPData(ip)
if not data:
data = {}
// Append the new data
data.update(ipdata)
data = json.dumps(data)
//self.print("Storing info for IP {}: {}".format(ip, ipdata),1,0)
After Change
// Get the previous info already stored
data = self.getIPData(ip)
key = next(iter(ipdata))
to_store = ipdata[key]
// If the key is already stored, do not modify it
try: