Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error handling for invalid data in dumps #19

Merged
merged 1 commit into from Mar 25, 2015
Merged

Conversation

filbertkm
Copy link
Contributor

For things like mismatching datatype / datavalue, or missing datatype (e.g. delete property?) or other corrupt data which I have in my local dev wiki.

These entries can simply be skipped, in my opinion.

The error handling could probably be made nicer than this, but at least this allows the script to finish running and produce a csv when there are errors in a json dump.

For things like mismatching datatype / datavalue,
or missing datatype (e.g. delete property?) or
other corrupt data which I have in my local dev wiki.

These entries can simply be skipped, in my opinion.
row = None

if row is not None:
csv_writer.writerow(row)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not put this line inside of the try block?

mariushoch added a commit that referenced this pull request Mar 25, 2015
Add error handling for invalid data in dumps
@mariushoch mariushoch merged commit b1aa0b5 into master Mar 25, 2015
@mariushoch mariushoch deleted the errorhandling branch March 25, 2015 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants