borgend.py

Fri, 19 Jan 2018 16:53:13 +0000

author
Tuomo Valkonen <tuomov@iki.fi>
date
Fri, 19 Jan 2018 16:53:13 +0000
changeset 6
46c89e5a219f
parent 4
d72c4844e791
child 8
7b2d2eac6a48
permissions
-rwxr-xr-x

subprocess improvements

#!/usr/local/bin/python3

import logging

logging.basicConfig(#filename='example.log',
                    format='%(levelname)s:%(message)s',
                    level=logging.DEBUG)

from backup import Backup
from config import settings
from queue import Queue
import ui

if __name__ == "__main__":
    #print(settings)
    #BorgendTray("Borgend").run()
    pass

backupconfigs=settings['backups']
backups=[None]*len(backupconfigs);

for i in range(len(backupconfigs)):
    logging.info('Setting up backup set %d' % i)
    backups[i]=Backup(i, backupconfigs[i])

queue=Queue()
backups[0].create(queue)

backups[0].join()

mercurial