@@ -1523,25 +1523,30 @@ def _parse_iso(context, repos, exml):
1523
1523
1524
1524
if hasattr (md , 'dataquality' ):
1525
1525
try :
1526
- _set (context , recobj , 'pycsw:Degree' , ',' .join (md .dataquality .conformancedegree ))
1527
- except :
1528
- None
1529
- try :
1530
- _set (context , recobj , 'pycsw:Lineage' , md .dataquality .lineage )
1531
- except :
1532
- None
1526
+ if hasattr (md .dataquality , 'conformancedegree' ):
1527
+ _set (context , recobj , 'pycsw:Degree' , ',' .join (md .dataquality .conformancedegree ))
1528
+ except Exception as err :
1529
+ LOGGER .debug ('No dq conformancedegree' , err )
1530
+ try :
1531
+ if hasattr (md .dataquality , 'lineage' ):
1532
+ _set (context , recobj , 'pycsw:Lineage' , md .dataquality .lineage )
1533
+ except Exception as err :
1534
+ LOGGER .debug ('No dq lineage' , err )
1533
1535
try :
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
1536
+ if hasattr (md .dataquality , 'specificationtitle' ):
1537
+ _set (context , recobj , 'pycsw:SpecificationTitle' , md .dataquality .specificationtitle )
1538
+ except Exception as err :
1539
+ LOGGER .debug ('No dq specification title' , err )
1540
+ try :
1541
+ if hasattr (md .dataquality , 'specificationdate' ):
1542
+ _set (context , recobj , 'pycsw:SpecificationDate' ,
1543
+ next (iter (md .dataquality .specificationdate ), None ))
1544
+ except Exception as err :
1545
+ LOGGER .debug ('No dq specification date' , err )
1540
1546
1541
1547
if hasattr (md , 'contact' ) and len (md .contact ) > 0 :
1542
1548
_set (context , recobj , 'pycsw:ResponsiblePartyRole' , md .contact [0 ].role )
1543
1549
1544
-
1545
1550
if hasattr (md , 'contentinfo' ) and len (md .contentinfo ) > 0 :
1546
1551
for ci in md .contentinfo :
1547
1552
if isinstance (ci , MD_ImageDescription ):
0 commit comments