Skip to content
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

[fluorine] fix to salt.utils.vt.Terminal #51061

Conversation

Projects
None yet
4 participants
@garethgreenaway
Copy link
Member

commented Jan 4, 2019

What does this PR do?

When writing output to stdout we want to ensure that the data is a st…ring not bytes. Under py2 the salt.utils.data.encode function results in a string but under py3 the result is a bytestring. Swapping out salt.utils.data.encode for salt.utils.stringutils.to_str.

What issues does this PR fix or reference?

saltstack/salt-jenkins#1232

Previous Behavior

salt-cloud under Python3 wasn't working and would endless attempt to perform the initial login for deployment.

New Behavior

salt-cloud works again under Python3.

Tests written?

Tests exist.

Commits signed with GPG?

Yes/No

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

When writing output to stdout we want to ensure that the data is a st…
…ring not bytes. Under py2 the salt.utils.data.encode function results in a string but under py3 the result is a bytestring. Swapping out salt.utils.data.encode for salt.utils.stringutils.to_str.

@garethgreenaway garethgreenaway requested a review from saltstack/team-core Jan 4, 2019

@garethgreenaway garethgreenaway merged commit 290f461 into saltstack:fluorine Jan 4, 2019

10 checks passed

WIP Ready for review
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint Python lint test has passed
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py2-windows-2016 The py2-windows-2016 job has passed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details
jenkins/pr/py3-windows-2016 The py3-windows-2016 job has passed
Details
@damon-atkins

This comment has been minimized.

Copy link
Member

commented Jan 5, 2019

See comments in Fix salt-cloud UnicodeEncodeError when writing to stdout #50236 the orginal PR that made this update, or first attempt at a fix.

@damon-atkins

This comment has been minimized.

Copy link
Member

commented Jan 5, 2019

This should be applied to 2018.3

@Ch3LL

This comment has been minimized.

Copy link
Contributor

commented Jan 11, 2019

Backported to 2018.3 here: #51151

dwoz added a commit that referenced this pull request Jan 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.