Skip to content

Use more idiomatic Python to parse metadata file

Vijay Kartik requested to merge better_metadata_parsing into master

For crawling through the JSON keys in the metadata file, I have now moved from a "LBYL" (Look Before You Leap) approach of checking if JSON keys exist before reading them, to a "EAFP" (Easier to Ask Forgiveness than Permission) approach of trying read JSON keys in try-except blocks and deal with missing keys in one go.

Also added tests for when the module encounters metadata files with missing must-have keys.

Merge request reports