@@ -1521,15 +1521,22 @@ def _parse_iso(context, repos, exml):
15211521
15221522 _set (context , recobj , 'pycsw:ServiceType' , ',' .join (service_types ))
15231523
1524- if hasattr (md_identification , 'dataquality' ):
1525- _set (context , recobj , 'pycsw:Degree' , md .dataquality .conformancedegree )
1526- _set (context , recobj , 'pycsw:Lineage' , md .dataquality .lineage )
1527- _set (context , recobj , 'pycsw:SpecificationTitle' , md .dataquality .specificationtitle )
1528- if hasattr (md .dataquality , 'specificationdate' ):
1529- _set (context , recobj , 'pycsw:specificationDate' ,
1530- md .dataquality .specificationdate [0 ].date )
1531- _set (context , recobj , 'pycsw:SpecificationDateType' ,
1532- md .dataquality .specificationdate [0 ].datetype )
1524+ if hasattr (md , 'dataquality' ):
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
1533+ 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
15331540
15341541 if hasattr (md , 'contact' ) and len (md .contact ) > 0 :
15351542 _set (context , recobj , 'pycsw:ResponsiblePartyRole' , md .contact [0 ].role )
0 commit comments