@@ -1523,25 +1523,30 @@ def _parse_iso(context, repos, exml):
15231523
15241524 if hasattr (md , 'dataquality' ):
15251525 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 )
15331535 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 )
15401546
15411547 if hasattr (md , 'contact' ) and len (md .contact ) > 0 :
15421548 _set (context , recobj , 'pycsw:ResponsiblePartyRole' , md .contact [0 ].role )
15431549
1544-
15451550 if hasattr (md , 'contentinfo' ) and len (md .contentinfo ) > 0 :
15461551 for ci in md .contentinfo :
15471552 if isinstance (ci , MD_ImageDescription ):
0 commit comments