Mercurial > templog
diff py/uploader.py @ 292:28eb733cb803
60 second timeout
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 19 Mar 2015 21:50:52 +0800 |
parents | 16a83e2c97a0 |
children | d15dda1b1f76 |
line wrap: on
line diff
--- a/py/uploader.py Fri Dec 19 22:53:31 2014 +0800 +++ b/py/uploader.py Thu Mar 19 21:50:52 2015 +0800 @@ -48,7 +48,7 @@ js_enc = binascii.b2a_base64(zlib.compress(js)) mac = hmac.new(config.HMAC_KEY, js_enc).hexdigest() send_data = {'data': js_enc, 'hmac': mac} - r = requests.post(config.UPDATE_URL, data=send_data) + r = requests.post(config.UPDATE_URL, data=send_data, timeout=60) result = r.text if result != 'OK': raise Exception("Server returned %s" % result)