mirror of
https://github.com/python/cpython
synced 2024-09-19 23:41:48 +00:00
asyncio: Fix repr(BaseSubprocessTransport) if it didn't start yet
Replace "running" with "not started" and don't show the pid if the subprocess didn't start yet.
This commit is contained in:
parent
84c717dd9e
commit
7a82afee70
|
@ -54,11 +54,14 @@ def __repr__(self):
|
|||
info = [self.__class__.__name__]
|
||||
if self._closed:
|
||||
info.append('closed')
|
||||
info.append('pid=%s' % self._pid)
|
||||
if self._pid is not None:
|
||||
info.append('pid=%s' % self._pid)
|
||||
if self._returncode is not None:
|
||||
info.append('returncode=%s' % self._returncode)
|
||||
else:
|
||||
elif self._pid is not None:
|
||||
info.append('running')
|
||||
else:
|
||||
info.append('not started')
|
||||
|
||||
stdin = self._pipes.get(0)
|
||||
if stdin is not None:
|
||||
|
|
Loading…
Reference in a new issue