Open
Conversation
981cdd2 to
83e3af8
Compare
tomkralidis
requested changes
Mar 15, 2025
Member
There was a problem hiding this comment.
Make exceptions more explicit?
if hasattr(md, 'dataquality'):
_set(context, recobj, 'pycsw:Degree', ','.join(md.dataquality.conformancedegree))
_set(context, recobj, 'pycsw:Lineage', md.dataquality.lineage)
_set(context, recobj, 'pycsw:SpecificationTitle', md.dataquality.specificationtitle)
try:
_set(context, recobj, 'pycsw:SpecificationDate', md.dataquality.specificationDate[0])
except IndexError:
LOGGER.debug('No specification date')
Contributor
Author
There was a problem hiding this comment.
indexerror is not thrown if element does not exist, not sure when it is thrown
replaced it for normal exception, then logging the exception, was that the idea?
83e3af8 to
3abba80
Compare
9570f93 to
f3afaa3
Compare
|
This Pull Request has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days. |
f3afaa3 to
f124a82
Compare
|
This Pull Request has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
fixes bug on metadata import
Related Issue / Discussion
fixes #923
Additional Information
uses try catch when property is not available (not provided by owslib) instead of hasattr
Contributions and Licensing
(as per https://github.com/geopython/pycsw/blob/master/CONTRIBUTING.rst#contributions-and-licensing)