feat: add support for python3

- Use jq where possible
- Drop unused function (no usage across entire codebase nor in any github repository

Closes #3689
This commit is contained in:
Jose Diaz-Gonzalez committed 2019-09-19 23:33:43 -04:00
1 parent 7bd4d32cb3
commit b4e95fe0d5
9 files changed
+20 -26

No files matched your search

+8 -4
View File
@@ -1,11 +1,15 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
import cgi
import json
import os
import re
import SimpleHTTPServer
import SocketServer
try:
import SimpleHTTPServer
import SocketServer
except ImportError:
import http.server as SimpleHTTPServer
import socketserver as SocketServer
import subprocess
import sys
import threading
@@ -232,7 +236,7 @@ def main():
port = int(os.getenv('PORT', 2000))
httpd = SocketServer.TCPServer(("", port), GetHandler)
print "Listening on 0.0.0.0:{0}, CTRL+C to stop".format(port)
print("Listening on 0.0.0.0:{0}, CTRL+C to stop".format(port))
httpd.serve_forever()