Skip to content

Conversation

bridadan
Copy link
Contributor

@bridadan bridadan commented Apr 5, 2018

This should fix #322.

The bug wasn't as bad as I thought. We already wrap every access to the Windows Registry with try/except blocks for when/if they fail. This was the one and only access to the Windows Registry that wasn't protected. So this PR just adds the try/except block.

I broke apart the from_iterable call to make sure we don't skip over the entire list of keys we're iterating over if an error is received in the middle of the list. This way it'll just move onto the next key. It also makes it a bit more clear what we're iterating over.

FYI @c1728p9

@coveralls
Copy link

coveralls commented Apr 5, 2018

Coverage Status

Coverage decreased (-0.07%) to 77.862% when pulling 862896c on bridadan:fix_registry_error into ccc3e8f on ARMmbed:master.

Copy link
Contributor

@theotherjimmy theotherjimmy left a comment

Choose a reason for hiding this comment

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

Good call on the logging.

@theotherjimmy theotherjimmy merged commit 303c9e5 into ARMmbed:master Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WindowsError raised when reading the registry
3 participants