utils.py@8f3ac19f11b6
utils.py
Sun, 21 Jan 2018 22:43:57 +0000
- author
- Tuomo Valkonen <tuomov@iki.fi>
- date
- Sun, 21 Jan 2018 22:43:57 +0000
- changeset 43
- 8f3ac19f11b6
- parent 40
-
cfbeeec8cb82
- permissions
- -rw-r--r--
Use platform package to detect whether to:
* rumps vs. xdg for configuration file location, and
* try to display a tray icon
#
# 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))