Skip to content

Commit

Permalink
Fixed unicode literals in Python and MOF strings
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
  • Loading branch information
andy-maier committed Jun 6, 2018
1 parent bb2a70a commit 4204ade
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: pywbem
Version: 0.12.1.dev32
Version: 0.12.1.dev42
Summary: pywbem - A WBEM client
Home-page: http://pywbem.github.io/pywbem/
Author: Tim Potter
Expand Down
4 changes: 3 additions & 1 deletion pywbem_mock/_wbemconnection_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,16 @@ def _uprint(dest, text):
"""
Write text to dest, adding a newline character.
Text must be a unicode string and must not be None.
Text must be bytes or a unicode string and must not be None.
If dest is a file path, the text is encoded to a UTF-8 Byte sequence and
is appended to the file (opening and closing the file).
If dest is None, the text is encoded to a codepage suitable for the current
stdout and is written to stdout.
"""
if isinstance(text, six.binary_type):
text = text.decode('utf-8')
if dest is None:
btext = text.encode(STDOUT_ENCODING, 'replace')
if six.PY3:
Expand Down
Empty file modified testsuite/test_uprint.bat
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions testsuite/test_wbemconnection_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -1206,8 +1206,8 @@ def test_unicode(self, conn):
cmof = u"""
class CIM_Foo {
[Key,
Description (" \u0420\u043e\u0441\u0441\u0438\u044f"
"\u00E0 voil\u00e0")]
Description ("\u212b \u0420\u043e\u0441\u0441\u0438"
"\u044f\u00E0 voil\u00e0")]
string InstanceID;
};
"""
Expand Down

0 comments on commit 4204ade

Please sign in to comment.