Fix imports of borg/*.py modules now that they've been split out.

This commit is contained in:
Dan Helfman 2017-08-05 22:26:28 -07:00
parent 247d36a309
commit 793ffbd048
1 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@ import os
from subprocess import CalledProcessError from subprocess import CalledProcessError
import sys import sys
from borgmatic import borg from borgmatic.borg import check, create, prune
from borgmatic.config import collect, convert, validate from borgmatic.config import collect, convert, validate
@ -92,20 +92,20 @@ def main(): # pragma: no cover
) )
remote_path = location.get('remote_path') remote_path = location.get('remote_path')
borg.initialize(storage) create.initialize(storage)
for repository in location['repositories']: for repository in location['repositories']:
if args.prune: if args.prune:
borg.prune_archives(args.verbosity, repository, retention, remote_path=remote_path) prune.prune_archives(args.verbosity, repository, retention, remote_path=remote_path)
if args.create: if args.create:
borg.create_archive( create.create_archive(
args.verbosity, args.verbosity,
repository, repository,
location, location,
storage, storage,
) )
if args.check: if args.check:
borg.check_archives(args.verbosity, repository, consistency, remote_path=remote_path) check.check_archives(args.verbosity, repository, consistency, remote_path=remote_path)
except (ValueError, OSError, CalledProcessError) as error: except (ValueError, OSError, CalledProcessError) as error:
print(error, file=sys.stderr) print(error, file=sys.stderr)
sys.exit(1) sys.exit(1)