class GpgProcessError(GpgError): @classmethod def mk_from(cls, other: CalledProcessError) -> 'GpgProcessError': return GpgProcessError(**other.__dict__) def __init__( self, returncode: int, cmd: _CmdT, output: Optional[str] = None, stderr: Optional[str] = None ) -> None: cmd_str = _format_cmd(cmd) self._impl = CalledProcessError(returncode, cmd_str, output, stderr) self._cmd = cmd def __str__(self) -> str: return self._impl.__str__() @property def returncode(self) -> int: return self._impl.returncode @property def cmd(self) -> _CmdT: return self._cmd @property def output(self) -> Optional[str]: return self._impl.output @property def stderr(self) -> Optional[str]: return self._impl.stderr @property def stdout(self) -> Optional[str]: return self._impl.output
def __str__(self): s = CalledProcessError.__str__(self) s += ": %s" % (self.stderr) return s
def __str__(self): return '{}\nSTDOUT: {}\nSTDERR:{}'.format( CalledProcessError.__str__(self), self.output, self.error)
def __str__(self): return '{}\nSTDOUT: {}\nSTDERR:{}'.format(CalledProcessError.__str__(self), self.output, self.error)
def __str__(self): return CalledProcessError.__str__(self) + "\n%s" % self.out