-
Notifications
You must be signed in to change notification settings - Fork 391
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
Fix bug in WCC module #137
Conversation
Thanks for the bug report! |
Thanks! |
If that can help you, I'm using the terminology used by Windows, where (for example) HKEY_CLASSES_ROOT\ms-msime-imjpdct is the key, EditFlags is the value, and 0x00200000 is the data: But sometimes the same can be referred as HKEY_CLASSES_ROOT\ms-msime-imjpdct\EditFlags as being the key, and 0x00200000 the value, without any mention of "data". reg_query_value accommodates for the two cases by saying: if the argument valueName is not None, we're in the first case (key, value, and data), otherwise we're in the second one (just key and value). Hence the if..else at the end. Makes me realize I really need to comment this part of the code 😆 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a little problem on line 591, it should be get_value(subkey_handle)[2]
instead of get_value(subkey_handle)[3]
, because get_value only returns 3 values, not 4.
The module is working fine for now as the if
is actually never entered, but it will throw an IndexError if that ever happens.
Ah yes the classic index mistake. Gonna fix it fast, thanks for pointing out |
Fixes bug introduced by commit bfd32f1
It was causing errors like the following saying that the variable 'data' did not exist: