Skip to content

Commit 6c0c2b5

Browse files
committed
match list length xx with xx_url (don't remove None, set as '')
1 parent c260cd5 commit 6c0c2b5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

owslib/iso.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def testAllCharOrAnchor(md,xpath,aslist=True):
5858
if aslist:
5959
return ro
6060
else:
61-
return {'name': [i['name'] for i in ro if i['name'] not in [None,'']],
62-
'url': [i['url'] for i in ro if i['url'] not in [None,'']]}
61+
return {'name': [i.get('name', '') for i in ro],
62+
'url': [i.get('url', '') for i in ro]}
6363

6464

6565

tests/test_iso_parsing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def test_md_parsing_dov():
139139

140140
assert_list(iden.otherconstraints, 2)
141141
assert iden.otherconstraints_url[
142-
0] == "https://inspire.ec.europa.eu/metadata-codelist/ConditionsApplyingToAccessAndUse/noConditionsApply"
142+
1] == "https://inspire.ec.europa.eu/metadata-codelist/ConditionsApplyingToAccessAndUse/noConditionsApply"
143143
assert iden.otherconstraints[
144144
0] == "Data beschikbaar voor hergebruik volgens de " \
145145
"Modellicentie Gratis Hergebruik. Toelichting " \

0 commit comments

Comments
 (0)