From cd41524e57b2ff304009bbf0c14e156cddf966c1 Mon Sep 17 00:00:00 2001 From: brent s Date: Fri, 26 Jul 2019 11:39:37 -0400 Subject: [PATCH] whoops! --- backup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backup.py b/backup.py index e0f38ee..ea7a5fb 100755 --- a/backup.py +++ b/backup.py @@ -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="? + # 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