
Use eventlet.green.subprocess if eventlet is used and enable eventlet tests on Python 3. This change adds oslo_rootwrap.subprocess which is eventlet.green.subprocess if eventlet monkey-patching is enabled or if the TEST_EVENTLET environment variable is set, or subprocess of the Python standard library otherwise. When eventlet is used (with monkey-patching or not), it's more reliable to use eventlet.green.subprocess instead of using directly subprocess from the Python standard library. On Python 2, it "works" to use directly subprocess: subprocess.Popen calls os.pipe() and os.fdopen(fd) which are both monkey-patched. On Python 3, it doesn't work because subprocess uses os.pipe() and io.open(fd), and the io module is *not* monkey-patched at all. Change-Id: Ib859bebe52612b35f0f1f53aedf76222683795e7
oslo.rootwrap -- Escalated Permission Control
oslo.rootwrap allows fine-grained filtering of shell commands to run as root from OpenStack services.
- License: Apache License, Version 2.0
- Documentation: http://docs.openstack.org/developer/oslo.rootwrap
- Source: http://git.openstack.org/cgit/openstack/oslo.rootwrap
- Bugs: http://bugs.launchpad.net/oslo.rootwrap
Description
Languages
Python
100%