utils.py

Mon, 22 Jan 2018 02:37:46 +0000

author
Tuomo Valkonen <tuomov@iki.fi>
date
Mon, 22 Jan 2018 02:37:46 +0000
changeset 47
305de2297fde
parent 40
cfbeeec8cb82
permissions
-rw-r--r--

README configuration file location update

#
# Utility functions for Borgend
#

def log_exception(logger, err, detail=None):
    err_type=err.__class__.__name__
    if detail:
        logger.critical('%s:%s "%s"', str(detail), err_type, str(err))
    else:
        logger.critical('%s "%s"', err_type, str(err))

mercurial