Skip to content

Commit

Permalink
wa on string returns
Browse files Browse the repository at this point in the history
  • Loading branch information
radinsky committed Dec 30, 2016
1 parent 7ff836d commit f305291
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ def do_GET(self):
if result == False:
self.wfile.write("Failed getting A1 data")
else:
self.wfile.write('''{ "%s": %s }''' % (sensor, result))

if sensor == 'temperature' or sensor == 'humidity':
self.wfile.write('''{ "%s": %s }''' % (sensor, result))
else:
self.wfile.write('''{ "%s": "%s" }''' % (sensor, result))
else:
self.wfile.write("Failed")

Expand Down

0 comments on commit f305291

Please sign in to comment.