[tor-commits] [sbws/master] Python 3.4 doesn't have HTTPStatus
pastly at torproject.org
pastly at torproject.org
Tue Jun 26 15:36:49 UTC 2018
commit 815afcd6eacc1ba83669c1e7433e399f7a63f15b
Author: Matt Traudt <sirmatt at ksu.edu>
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()))
More information about the tor-commits
mailing list