aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xserve.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/serve.py b/serve.py
index be8c047..012ae44 100755
--- a/serve.py
+++ b/serve.py
@@ -30,8 +30,9 @@ class Handler(BaseHTTPRequestHandler):
return
if os.getenv('GSX_THROTTLE'):
- self.log_message('Throttling for %d' % os.getenv('GSX_THROTTLE'))
- time.sleep(os.getenv('GSX_THROTTLE'))
+ t = int(os.getenv('GSX_THROTTLE'))
+ self.log_message('Throttling for %d' % t)
+ time.sleep(t)
self.send_response(200)
l = int(self.headers['Content-Length'])