Commit d497141b authored by Denis Bilenko's avatar Denis Bilenko

subprocess: add __repr__ to Popen

parent c90621c7
...@@ -161,6 +161,9 @@ class Popen(object): ...@@ -161,6 +161,9 @@ class Popen(object):
else: else:
self.stderr = FileObject(errread, 'rb') self.stderr = FileObject(errread, 'rb')
def __repr__(self):
return '<%s at 0x%x pid=%r returncode=%r>' % (self.__class__.__name__, id(self), self.pid, self.returncode)
def _on_child(self, watcher): def _on_child(self, watcher):
watcher.stop() watcher.stop()
self._handle_exitstatus(watcher.rstatus) self._handle_exitstatus(watcher.rstatus)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment