34 |
35 |
35 # |
36 # |
36 # Done parsing args, import our own modules, and launch everything |
37 # Done parsing args, import our own modules, and launch everything |
37 # |
38 # |
38 |
39 |
39 import branding |
40 import borgend.config as config |
40 import config |
41 import borgend.dreamtime as dreamtime |
41 import dreamtime |
42 import borgend.loggers as loggers |
42 import loggers |
43 from borgend.scheduler import Scheduler |
43 import logging |
44 from borgend.repository import Repository |
44 from scheduler import Scheduler |
45 from borgend.backup import Backup |
45 from repository import Repository |
|
46 from backup import Backup |
|
47 |
46 |
48 logger=loggers.mainlogger |
47 logger=loggers.mainlogger |
49 |
48 |
50 if args.debug: |
49 if args.debug: |
51 logger.setLevel(logging.DEBUG) |
50 logger.setLevel(logging.DEBUG) |
83 if args.notray or platform.system()!='Darwin': |
82 if args.notray or platform.system()!='Darwin': |
84 # Wait for scheduler to finish |
83 # Wait for scheduler to finish |
85 scheduler.join() |
84 scheduler.join() |
86 else: |
85 else: |
87 # Start UI, and let it handle exit control |
86 # Start UI, and let it handle exit control |
88 from ui import BorgendTray |
87 from borgend.ui import BorgendTray |
89 tray=BorgendTray(backups); |
88 tray=BorgendTray(backups); |
90 tray.run() |
89 tray.run() |
91 |
90 |
92 except Exception as err: |
91 except Exception as err: |
93 # TODO: Should write errors here to stderr; |
92 # TODO: Should write errors here to stderr; |