Mercurial > templog
comparison server/ts.py @ 29:048143905092
work on web interface
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 12 Jun 2012 23:27:53 +0800 |
parents | e3e0ed7758f9 |
children | e18d7e89c17d |
comparison
equal
deleted
inserted
replaced
28:e3e0ed7758f9 | 29:048143905092 |
---|---|
108 print>>sys.stderr, "Bad response to btoff '%s'\n" % l | 108 print>>sys.stderr, "Bad response to btoff '%s'\n" % l |
109 | 109 |
110 return int(next_wake) | 110 return int(next_wake) |
111 | 111 |
112 def send_results(lines): | 112 def send_results(lines): |
113 enc_lines = binascii.b2a_base64('\n'.join(lines)) | 113 enc_lines = binascii.b2a_base64(zlib.compress('\n'.join(lines))) |
114 hmac.new(config.HMAC_KEY, enc_lines).hexdigest() | 114 hmac.new(config.HMAC_KEY, enc_lines).hexdigest() |
115 | 115 |
116 url_data = urllib.url_encode( ('lines', enc_lines), ('hmac', mac) ) | 116 url_data = urllib.url_encode( ('lines', enc_lines), ('hmac', mac) ) |
117 con = urllib2.urlopen(config.UPDATE_URL, url_data) | 117 con = urllib2.urlopen(config.UPDATE_URL, url_data) |
118 | 118 |