fix nan problem

master
James Gao 2014-11-29 20:41:14 -08:00
rodzic 79e1403f03
commit 61721b936a
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -5,6 +5,7 @@ import os
import re
import time
import json
import math
import traceback
import inspect
@ -38,7 +39,7 @@ class MainHandler(ManagerHandler):
return self.render(os.path.join(paths.html_templates, "main.html"),
state=self.manager.state.__class__.__name__,
state_data=json.dumps(self.manager.state.status),
state_data=json.dumps(self.manager.state.status, allow_nan=False),
profiles=profiles,
)
@ -119,7 +120,7 @@ class WebApp(object):
self.port = port
def send(self, data):
jsondat = json.dumps(data)
jsondat = json.dumps(data, allow_nan=False)
for sock in self.clients:
sock.write_message(jsondat)