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