aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2018-10-09 18:09:10 +0300
committerFilipp Lepalaan <filipp@mac.com>2018-10-09 18:09:10 +0300
commitd849b9447c38b09d3edd2b03bd46249be6f5990a (patch)
tree5af063dc91df64a05f75cadb43187e0897c5c4ec
parent1c6b35652e8d71c5e22502f44df9079734a138bf (diff)
downloadgsx-mockserver-d849b9447c38b09d3edd2b03bd46249be6f5990a.tar.gz
gsx-mockserver-d849b9447c38b09d3edd2b03bd46249be6f5990a.tar.bz2
gsx-mockserver-d849b9447c38b09d3edd2b03bd46249be6f5990a.zip
Fix: Throttle debug message
-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'])