Skip to content

Commit

Permalink
Fix ISO metadata parsing for empty gmd:featureCatalogueCitation.
Browse files Browse the repository at this point in the history
This commit fixes the ISO metadata parsing for records that contain an
empty gmd:featureCatalogueCitation element.

It also adds tests for ISO metadata parsing as to ensure not to break
existing functionality in the future. Tests are added for two ISO
metadata records: one from DOV (already existing in the testdata) and
one from GéoBretage.

Closes issue geopython#491.
  • Loading branch information
Roel Huybrechts committed Aug 14, 2018
1 parent 0108285 commit 27f4aa9
Show file tree
Hide file tree
Showing 3 changed files with 1,308 additions and 1 deletion.
2 changes: 1 addition & 1 deletion owslib/iso.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ def __init__(self, fcd=None):

self.featurecatalogues = []
for i in fcd.findall(util.nspath_eval('gmd:featureCatalogueCitation', namespaces)):
val = i.attrib['uuidref']
val = i.attrib.get('uuidref')
val = util.testXMLValue(val, attrib=True)
if val is not None:
self.featurecatalogues.append(val)
Expand Down
Loading

0 comments on commit 27f4aa9

Please sign in to comment.