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

tools: use py2.6 equivalent of check_output #6714

Closed
wants to merge 2 commits into from

Conversation

thefourtheye
Copy link
Contributor

Checklist
  • tests and code linting passes
  • the commit message follows commit guidelines
Affected core subsystem(s)

tools

Description of change

Python 2.6 does not have subprocess.check_output, as it was
introduced only in Python 2.7. This patch uses subprocess.Popen to
get the data written to stdout by the pkg-config program.

Fixes: #6711

cc @bnoordhuis

Python 2.6 does not have `subprocess.check_output`, as it was
introduced only in Python 2.7. This patch uses `subprocess.Popen` to
get the data written to stdout by the `pkg-config` program.

Fixes: nodejs#6711
@thefourtheye thefourtheye added the tools Issues and PRs related to the tools directory. label May 12, 2016
stdout = subprocess.Popen(shlex.split(pkg_config) + [args, flag, pkg],
stdout=subprocess.PIPE).communicate()[0].strip()
except OSError as e:
if e.errno == errno.ENONET:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You misspelled ENOENT.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@bnoordhuis
Copy link
Member

Isn't this basically the patch I posted in #6711 (comment)?

@thefourtheye
Copy link
Contributor Author

@bnoordhuis Yes it is. Were you waiting for the OP to confirm before sending the patch? Sorry I jumped the line :(

@thefourtheye thefourtheye deleted the fix-for-6711 branch May 12, 2016 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants