mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
add pass-through attribute getters to CompletedProcess
This commit is contained in:
parent
05e762aadd
commit
4f6bab539b
1 changed files with 5 additions and 0 deletions
|
@ -654,6 +654,11 @@ class CompletedProcess:
|
|||
def __eq__(self, other):
|
||||
return self.proc.returncode == other
|
||||
|
||||
def __getattr__(self, attr):
|
||||
if hasattr(self.proc, attr):
|
||||
return getattr(self.proc, attr)
|
||||
raise AttributeError('CompletedProcess instance has no attribute: %r' % attr)
|
||||
|
||||
|
||||
def subproc_captured_stdout(*cmds):
|
||||
"""Runs a subprocess, capturing the output. Returns the stdout
|
||||
|
|
Loading…
Add table
Reference in a new issue