aodn / compliance-checker

Python tool to check your datasets vs compliance standards. Forked to include AODN specific modifications.
Apache License 2.0
1 stars 0 forks source link

Fix small bug in check_date_created leading to run-time exception #73

Closed mhidas closed 9 years ago

mhidas commented 9 years ago

This check was checking the date format of the date_created attribute without first checking it was a string. If a file happens to have e.g. a float value there, you get:

The following exceptions occured during the imos checker (possibly indicate compliance checker issues):
imos.check_date_created: must be string, not numpy.float64

Also trying to make the code a bit more readable by moving the _check_str_type helper function above all the actual check functions.

mhidas commented 9 years ago

@ggalibert This one's for you.