--- a/ui.py Mon Jan 22 18:16:51 2018 +0000 +++ b/ui.py Mon Jan 22 18:56:43 2018 +0000 @@ -7,7 +7,6 @@ import datetime import logging import borgend -import utils import backup from threading import Lock, Timer from config import settings @@ -45,8 +44,7 @@ rumps.notification(title, subtitle, message, data=d) except Exception as err: - utils.log_exception(logger, err, - detail='Unable to display notification') + logger.exception("Failed to display notification") # Based on code snatched from # https://stackoverflow.com/questions/12523586/python-format-size-application-converting-b-to-kb-mb-gb-tb/37423778 @@ -71,6 +69,7 @@ def make_title(status): state=status['state'] + detail='' if status['type']=='scheduled': # Operation scheduled when=status['when'] @@ -178,7 +177,7 @@ self.title=traynames[active] def __status_callback(self, obj, index, status, errorlog): - logger.debug('Status callbackup %s' % str(status)) + logger.debug('Status callback: %s' % str(status)) with self.lock: self.statuses[index]=status @@ -208,7 +207,7 @@ try: b.create() except Exception as err: - utils.log_exception(logger, err) + logger.exception("Failure to initialise backup") notification_workaround(borgend.appname_stylised, err.__class__.__name__, str(err)) @@ -238,7 +237,7 @@ with logwindow_lock: logwindow[0]=None except Exception as err: - utils.log_exception(logger, err) + logger.exception("Failed to display log") # # Notification click response => show log window @@ -247,3 +246,4 @@ @rumps.notifications def notification_center(_): showlog() +