(self, protocol_factory, cmd, *,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=False,
shell=True, bufsize=0,
encoding=None, errors=None, text=None,
**kwargs)
| 1751 | logger.debug(' '.join(info)) |
| 1752 | |
| 1753 | async def subprocess_shell(self, protocol_factory, cmd, *, |
| 1754 | stdin=subprocess.PIPE, |
| 1755 | stdout=subprocess.PIPE, |
| 1756 | stderr=subprocess.PIPE, |
| 1757 | universal_newlines=False, |
| 1758 | shell=True, bufsize=0, |
| 1759 | encoding=None, errors=None, text=None, |
| 1760 | **kwargs): |
| 1761 | if not isinstance(cmd, (bytes, str)): |
| 1762 | raise ValueError("cmd must be a string") |
| 1763 | if universal_newlines: |
| 1764 | raise ValueError("universal_newlines must be False") |
| 1765 | if not shell: |
| 1766 | raise ValueError("shell must be True") |
| 1767 | if bufsize != 0: |
| 1768 | raise ValueError("bufsize must be 0") |
| 1769 | if text: |
| 1770 | raise ValueError("text must be False") |
| 1771 | if encoding is not None: |
| 1772 | raise ValueError("encoding must be None") |
| 1773 | if errors is not None: |
| 1774 | raise ValueError("errors must be None") |
| 1775 | |
| 1776 | protocol = protocol_factory() |
| 1777 | debug_log = None |
| 1778 | if self._debug: |
| 1779 | # don't log parameters: they may contain sensitive information |
| 1780 | # (password) and may be too long |
| 1781 | debug_log = 'run shell command %r' % cmd |
| 1782 | self._log_subprocess(debug_log, stdin, stdout, stderr) |
| 1783 | transport = await self._make_subprocess_transport( |
| 1784 | protocol, cmd, True, stdin, stdout, stderr, bufsize, **kwargs) |
| 1785 | if self._debug and debug_log is not None: |
| 1786 | logger.info('%s: %r', debug_log, transport) |
| 1787 | return transport, protocol |
| 1788 | |
| 1789 | async def subprocess_exec(self, protocol_factory, program, *args, |
| 1790 | stdin=subprocess.PIPE, stdout=subprocess.PIPE, |
nothing calls this directly
no test coverage detected