[PATCH 10 of 54] Parse Name and Organization in a Acknowledgment as multiple elements
Wald Commits
scm-commit at wald.intevation.org
Wed Jan 7 10:56:27 CET 2015
# HG changeset patch
# User Benoît Allard <benoit.allard at greenbone.net>
# Date 1412765060 -7200
# Node ID 4c6e15514a6dc4e8c4280ccca7602ace38fe338e
# Parent cb8b2a196f0b67b16484fc25999cc01f7ea94beb
Parse Name and Organization in a Acknowledgment as multiple elements
diff -r cb8b2a196f0b -r 4c6e15514a6d farolluz/parsers/cvrf.py
--- a/farolluz/parsers/cvrf.py Wed Oct 08 12:43:34 2014 +0200
+++ b/farolluz/parsers/cvrf.py Wed Oct 08 12:44:20 2014 +0200
@@ -94,9 +94,14 @@
def parseAcknowledgment(elem, ns='cvrf'):
+ names = []
+ for cvrfname in elem.findall(UN(ns, 'Name')):
+ names.append(cvrfname.text.strip())
+ orgs = []
+ for cvrforg in elem.findall(UN(ns, 'Organization')):
+ orgs.append(cvrforg.text.strip())
return CVRFAcknowledgment(
- elem.findtext(UN(ns, 'Name')),
- elem.findtext(UN(ns, 'Organization')),
+ names, orgs,
elem.findtext(UN(ns, 'Description')),
elem.findtext(UN(ns, 'URL')),
)
More information about the Farol-commits
mailing list