Remove partly old code

This commit is contained in:
Nico Schottelius 2016-10-24 21:34:16 +02:00
parent 70bd008498
commit 10edd719ca

View file

@ -3,7 +3,6 @@
import urllib import urllib
import psycopg2 import psycopg2
import websocket import websocket
# import xml.etree.ElementTree as ET
from http.server import BaseHTTPRequestHandler, HTTPServer from http.server import BaseHTTPRequestHandler, HTTPServer
import re import re
import json import json
@ -30,9 +29,6 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
length = int(self.headers['Content-Length']) length = int(self.headers['Content-Length'])
post_data = self.rfile.read(length).decode('utf-8') post_data = self.rfile.read(length).decode('utf-8')
# Print on stdout
print(post_data)
payload = self.dataToString(post_data) payload = self.dataToString(post_data)
deveui = self.dataToDevEUI(post_data) deveui = self.dataToDevEUI(post_data)
print("{}:{}".format(deveui, payload)) print("{}:{}".format(deveui, payload))
@ -121,8 +117,6 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
print("DB Insert failed: %s" % e) print("DB Insert failed: %s" % e)
if __name__ == '__main__': if __name__ == '__main__':
server_address = ('0.0.0.0', 8000) server_address = ('0.0.0.0', 8000)
httpd = HTTPServer(server_address, testHTTPServer_RequestHandler) httpd = HTTPServer(server_address, testHTTPServer_RequestHandler)