| # Copyright OpenEmbedded Contributors |
| # SPDX-License-Identifier: MIT |
| class OETestCalledProcessError(subprocess.CalledProcessError): |
| return o.decode("utf-8", errors="replace") |
| s = "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode) |
| if hasattr(self, "output") and self.output: |
| s = s + "\nStandard Output: " + strify(self.output) |
| if hasattr(self, "stderr") and self.stderr: |
| s = s + "\nStandard Error: " + strify(self.stderr) |
| def errors_have_output(): |
| subprocess.CalledProcessError = OETestCalledProcessError |