kopia lustrzana https://github.com/jamesgao/kiln_controller
fix nan problem
rodzic
79e1403f03
commit
61721b936a
|
@ -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)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue