Message253282
The class subprocess.CompletedProcess is currently lacking a __bool__() method.
It might be a practical feature to have the possibility to evaluate a CompletedProcess instance in an if/else block without the necessity to handle the exception raised by CompletedProcess.check_returncode().
Hence, I suggest adding the method
def __bool__(self):
return self.returncode == 0
to the class. |
|
Date |
User |
Action |
Args |
2015-10-21 10:50:58 | conqp | set | recipients:
+ conqp |
2015-10-21 10:50:58 | conqp | set | messageid: <1445424658.54.0.134413313052.issue25452@psf.upfronthosting.co.za> |
2015-10-21 10:50:58 | conqp | link | issue25452 messages |
2015-10-21 10:50:58 | conqp | create | |
|