diff options
author | 2016-11-10 17:50:27 +0200 | |
---|---|---|
committer | 2016-11-10 17:50:27 +0200 | |
commit | c11a833333cc5a9e9b0ce885caddef5a3b593fc4 (patch) | |
tree | 94ec8051673054850022c0845e1c3ec01e67a4f1 /backend | |
parent | Initial projects.xml parsing code with debug printout (diff) | |
download | grumpy-c11a833333cc5a9e9b0ce885caddef5a3b593fc4.tar.gz grumpy-c11a833333cc5a9e9b0ce885caddef5a3b593fc4.tar.bz2 grumpy-c11a833333cc5a9e9b0ce885caddef5a3b593fc4.zip |
Normalize subproject inherit-members to True or False during parsing
Diffstat (limited to 'backend')
-rw-r--r-- | backend/lib/sync.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/lib/sync.py b/backend/lib/sync.py index 7139119..291d701 100644 --- a/backend/lib/sync.py +++ b/backend/lib/sync.py @@ -43,8 +43,8 @@ def sync_projects(): if 'ref' in elem.attrib: if 'subprojects' not in proj: proj['subprojects'] = [] - # subprojects will be a list of (subproject_email, inherit-members) tuples where inherit-members is None, 0 or 1 (if dtd is followed). TODO: Might change if sync code will want it differently - proj['subprojects'].append((elem.attrib['ref'], elem.attrib['inherit-members'] if 'inherit-members' in elem.attrib else None)) + # subprojects will be a list of (subproject_email, inherit-members) tuples where inherit-members is True or False. TODO: Might change if sync code will want it differently + proj['subprojects'].append((elem.attrib['ref'], True if ('inherit-members' in elem.attrib and elem.attrib['inherit-members'] == '1') else False)) else: print("Invalid <subproject> tag inside project %s - required 'ref' attribute missing" % proj['email'] if 'email' in proj else "<unknown>") else: |