borgend.py

changeset 80
a409242121d5
parent 79
b075b3db3044
child 82
4e7678dd7b42
equal deleted inserted replaced
79:b075b3db3044 80:a409242121d5
3 # Common modules 3 # Common modules
4 import os 4 import os
5 import sys 5 import sys
6 import argparse 6 import argparse
7 import platform 7 import platform
8 import branding 8 import logging
9 # Own modules needed at this stage 9 # Own modules needed at this stage
10 import locations 10 import borgend.branding as branding
11 import borgend.locations as locations
11 12
12 # 13 #
13 # Argument processing 14 # Argument processing
14 # 15 #
15 16
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;

mercurial