borgend.py

changeset 82
4e7678dd7b42
parent 80
a409242121d5
child 85
56a000d15965
equal deleted inserted replaced
81:7bcd715f19e3 82:4e7678dd7b42
81 81
82 if args.notray or platform.system()!='Darwin': 82 if args.notray or platform.system()!='Darwin':
83 # Wait for scheduler to finish 83 # Wait for scheduler to finish
84 scheduler.join() 84 scheduler.join()
85 else: 85 else:
86 # This is needed for Ctrl+C to work.
87 # TODO: proper exit handler, which seems to require
88 # ditching/forking/extending rumps to extend the NSApp class
89 from PyObjCTools.AppHelper import installMachInterrupt
90 installMachInterrupt()
86 # Start UI, and let it handle exit control 91 # Start UI, and let it handle exit control
87 from borgend.ui import BorgendTray 92 from borgend.ui import BorgendTray
88 tray=BorgendTray(backups); 93 tray=BorgendTray(backups);
89 tray.run() 94 tray.run()
90 95
92 # TODO: Should write errors here to stderr; 97 # TODO: Should write errors here to stderr;
93 # perhaps add an extra stderr logger for error level messages 98 # perhaps add an extra stderr logger for error level messages
94 logger.exception("Exception fell through: exiting") 99 logger.exception("Exception fell through: exiting")
95 100
96 finally: 101 finally:
102 logger.debug("Exiting")
103
97 for b in backups: 104 for b in backups:
98 b.terminate() 105 b.terminate()
99 106
100 for r in repos: 107 for r in repos:
101 r.terminate() 108 r.terminate()

mercurial