Skip to content

Commit

Permalink
Add parameter to print output to to ignore errors
Browse files Browse the repository at this point in the history
Added errors='replace' to the unicode encode call on text output for
display_repository to try to bypass the error we are encountering with
Windows 64 bit platform on Appvuyer
  • Loading branch information
KSchopmeyer committed Jan 24, 2018
1 parent 76d3d4a commit 2a82f23
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pywbem_mock/_wbemconnection_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ def _display(dest, text):
Display to dest defined by text. This function appends the data
in text to the file defined by dest or to stdout of dest is None
"""
if six.PY2:
text = text.encode("utf-8")
text = text.encode("utf-8", errors='replace')
if not dest:
print(text)
else:
Expand Down

0 comments on commit 2a82f23

Please sign in to comment.