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

Python 3: Fix use of subprocess #9716

Merged
merged 2 commits into from Jun 11, 2019

Conversation

@leonardder
Copy link
Collaborator

commented Jun 11, 2019

Link to issue number:

None

Summary of the issue:

By default, the subprocess module outputs stdout in a bytes object. However, in several cases, we want to fetch strings from this output.

Description of how this pull request fixes the issue:

Provide the new text keyword argument to subprocess function calls. In the case of appx/sconscript, switch to subprocess.run(check=True) instead of subprocess.check.
Also, several uses of subprocess.list2cmdline where related to the use of shellapi.ShellExecute. I also looked at shellapi.ShellExecute as part of this and removed all unnecessary and broken calls of decode on unicode strings.

Testing performed:

T.b.d. I don't know of a good way to test the appx code locally.

Known issues with pull request:

None known

@leonardder leonardder requested a review from michaelDCurran Jun 11, 2019

@michaelDCurran michaelDCurran merged commit 031532d into nvaccess:threshold_py3_staging Jun 11, 2019

1 check failed

continuous-integration/appveyor/pr AppVeyor build failed
Details

@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Jun 11, 2019

@leonardder leonardder deleted the BabbageCom:subprocess branch Jun 20, 2019

@josephsl josephsl referenced this pull request Jul 23, 2019

Merged

What's new and readme: we are moving to Python 3.7 #9942

107 of 107 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.