@@ -1524,24 +1524,25 @@ def _parse_iso(context, repos, exml):
1524
1524
if hasattr (md , 'dataquality' ):
1525
1525
try :
1526
1526
_set (context , recobj , 'pycsw:Degree' , ',' .join (md .dataquality .conformancedegree ))
1527
- except :
1528
- None
1529
- try :
1527
+ except IndexError :
1528
+ LOGGER . debug ( 'No dq conformancedegree' )
1529
+ try :
1530
1530
_set (context , recobj , 'pycsw:Lineage' , md .dataquality .lineage )
1531
- except :
1532
- None
1531
+ except IndexError :
1532
+ LOGGER . debug ( 'No dq lineage' )
1533
1533
try :
1534
1534
_set (context , recobj , 'pycsw:SpecificationTitle' , md .dataquality .specificationtitle )
1535
- _set (context , recobj , 'pycsw:specificationDate' , md .dataquality .specificationDate [0 ])
1536
- # owslib does not provide datetype
1537
- # _set(context, recobj, 'pycsw:SpecificationDateType', md.dataquality.specificationDate[0].datetype)
1538
- except :
1539
- None
1535
+ except IndexError :
1536
+ LOGGER .debug ('No dq specification title' )
1537
+ try :
1538
+ _set (context , recobj , 'pycsw:SpecificationDate' ,
1539
+ next (iter (md .dataquality .specificationDate ), None ))
1540
+ except IndexError :
1541
+ LOGGER .debug ('No dq specification date' )
1540
1542
1541
1543
if hasattr (md , 'contact' ) and len (md .contact ) > 0 :
1542
1544
_set (context , recobj , 'pycsw:ResponsiblePartyRole' , md .contact [0 ].role )
1543
1545
1544
-
1545
1546
if hasattr (md , 'contentinfo' ) and len (md .contentinfo ) > 0 :
1546
1547
for ci in md .contentinfo :
1547
1548
if isinstance (ci , MD_ImageDescription ):
0 commit comments