[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [sbws/master] Python 3.4 doesn't have HTTPStatus
commit 815afcd6eacc1ba83669c1e7433e399f7a63f15b
Author: Matt Traudt <sirmatt@xxxxxxx>
Date: Sun Jun 17 21:30:40 2018 -0400
Python 3.4 doesn't have HTTPStatus
---
scripts/tools/sbws-http-server.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/tools/sbws-http-server.py b/scripts/tools/sbws-http-server.py
index d8575d0..f21499f 100755
--- a/scripts/tools/sbws-http-server.py
+++ b/scripts/tools/sbws-http-server.py
@@ -19,7 +19,6 @@
# Don't breathe too hard or this script might break.
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
import http.server
-from http import HTTPStatus
# import time
FILE_SIZE = 1*1024*1024*1024 # 1 GiB
@@ -39,7 +38,7 @@ class MyHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
super().__init__(*a, **kw)
def send_head(self, length):
- self.send_response(HTTPStatus.OK)
+ self.send_response(200)
self.send_header('Content-Type', 'application/octet-stream')
self.send_header('Content-Length', length)
# self.send_header('Last-Modified', self.date_time_string(time.time()))
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits