Mercurial > templog
diff py/utils.py @ 144:482d7852b511
a bit more, and some tests
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 26 Nov 2012 23:21:03 +0800 |
parents | 4755e6f9a5b8 |
children | 6517ddee3187 |
line wrap: on
line diff
--- a/py/utils.py Tue Nov 20 22:03:10 2012 +0800 +++ b/py/utils.py Mon Nov 26 23:21:03 2012 +0800 @@ -12,6 +12,10 @@ DEFAULT_TRIES = 3 READLINE_SELECT_TIMEOUT = 1 +def EX(msg, *args, **kwargs): + kwargs['exc_info'] = True + logging.error(msg, *args, **kwargs) + clock_gettime = None no_clock_gettime = True def monotonic_time():