Mercurial > templog
diff py/utils.py @ 253:0a1b642e3086
long polling config updates
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 08 Jun 2015 22:29:46 +0800 |
parents | 185621f47040 |
children | 26eee8591f61 |
line wrap: on
line diff
--- a/py/utils.py Wed May 27 23:46:06 2015 +0800 +++ b/py/utils.py Mon Jun 08 22:29:46 2015 +0800 @@ -4,6 +4,7 @@ import time import select import logging +import binascii D = logging.debug L = logging.info @@ -133,3 +134,5 @@ except Exception as e: return -1 +def hexnonce(): + return binascii.hexlify(os.urandom(120))