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
2019-09-17 03:06:00 -04:00
parent 7bd4d32cb3
commit b4e95fe0d5
9 changed files with 20 additions and 26 deletions

View File

@@ -42,7 +42,7 @@ def main():
download_urls['downloads/' + version['filename']] = version['download_url']
for filename, download_url in download_urls.items():
print "downloading", filename
print("downloading {0}".format(filename))
download_file(filename, download_url)
upload_file(filename)

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()