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

util: Don't check if process.stdin is None unless stdin_string is passed #1268

Merged
merged 2 commits into from Mar 28, 2020

Conversation

adisbladis
Copy link
Member

When calling subprocess.Popen passing anything except subprocess.PIPE as stdin the results stdin attribute is None.

If a file descriptor was passed as stdin we don't want to run this check.

When calling subprocess.Popen passing anything except subprocess.PIPE
as stdin the results stdin attribute is None.

If a file descriptor was passed as stdin we don't want to run this check.
@grahamc
Copy link
Member

grahamc commented Mar 28, 2020

I wonder how tricky it would be to write a test for this, what do you think?

@adisbladis adisbladis force-pushed the util-fd-fix branch 2 times, most recently from fc9b190 to 8d2f8ae Compare March 28, 2020 17:45
@adisbladis
Copy link
Member Author

adisbladis commented Mar 28, 2020

This test https://github.com/NixOS/nixops/pull/1268/files#diff-f622ee648d48b94128d5bbef35efceceR23 would have caught the issue.

Manually verified by reverting the fixup commit.

@grahamc
Copy link
Member

grahamc commented Mar 28, 2020

test coverage 📈
type coverage 📈

@grahamc grahamc merged commit 8048f73 into NixOS:master Mar 28, 2020
@grahamc grahamc added this to the 2.0 milestone Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants