Repository navigation
Windows Registry Unicode Support and PY2 character encoding (module.reg) - #32835
Merged
Merged
Conversation
* Start at PY3 support, however not tested against PY3 * Change to Unicode including from __future__ import unicode_literals * If PY2 converts all parameter input unicode to local encoding i.e. Unicode to String * If PY3 stays as Unicode as PY3 uses Windows Wide Char * Supports non-asiic characters i.e. > 126 * All output is Unicode, before most of it was Unicode output * Added a safty check to recursive delete to try and prevent a mistake like removing all of SOFTWARE * Fixed all the pylint errors * add _ prefix to internal functions * Provided unit test see reg_win_test.py reg_win_test.py * All tests currently make real changes to the registry * All changes are performed under SOFTWARE\SaltStackTest under HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER * Their is still room for more tests to be developed * Test target the new Unicode features of reg.py e.g. Copyright, Tradmark and Register characters * General the values set in the registy contain date/time and then checked that they are the current date/time to make sure they are not left over from old tests
Contributor
Author
|
FYI @hrumph @twangboy, @TheBigBear, @UtahDave @jfindlay |
Contributor
|
@damon-atkins It looks like one of the tests is failing from this change. Can you take a look? |
Contributor
Author
|
How do I configure a test to only run on Windows only, as it does not make sense for it to run on Unix/Linux as it has resulted in the failed test runs, since _wnreg module does not exist on Unix/Linux ImportError: Failed to import test module: unit.modules.reg_win_test |
added 2 commits
April 27, 2016 01:32
Removed some code which was commented out which is not required
Contributor
Author
|
Thanks for Merging it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
salt module reg (reg.py)
reg_win_test.py
What issues does this PR fix or reference?
*Current version did not support unicode input
*Output was mostly unicode, now all output should be unicode
*No Unit tests
Previous Behavior
Mixed Unicode Support
Not reliable Unicode Support
No PY3 support
New Behavior
PY3 Support (not tested)
Handles unicode parameter input.
Outputs only unicode
Tests written?
Yes