This commit is contained in:
brent s 2019-07-26 11:39:37 -04:00
parent 6e38ccea79
commit cd41524e57
1 changed files with 4 additions and 1 deletions

View File

@ -133,6 +133,9 @@ class Backup(object):
for a in repo.attrib:
r[a] = repo.attrib[a]
for e in ('path', 'exclude'):
# TODO: have an attrib for path and exclude, "glob=<bool>"?
# If true, try using the glob module to resolve paths?
# This gives us the benefit of allowing glob per-path/exclude.
r[e] = [i.text for i in repo.findall(self.ns + e)]
for prep in repo.findall('{0}prep'.format(self.ns)):
if 'prep' not in r:
@ -759,7 +762,7 @@ def convertConf(cfgfile):
server.attrib['target'] = oldcfg['config']['host']
server.attrib['remote'] = 'true'
server.attrib['rsh'] = oldcfg['config']['ctx']
server.attrib['user'] = oldcfg['config'].get('user', pwd.getpwnam(os.geteuid()).pw_name)
server.attrib['user'] = oldcfg['config'].get('user', pwd.getpwuid(os.geteuid()).pw_name)
for r in oldcfg['repos']:
repo = etree.Element('repo')
repo.attrib['name'] = r