summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-14 11:54:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-16 17:41:59 +0100
commitec6edfc27f2cfa990dd0f8b2bbc6f9472a50a839 (patch)
tree173b0fce5e4e367d39847239025303ec1c6068ef
parente53c974aceec03eb61c78e29ee19b28a5ea58f0b (diff)
downloadpoky-ec6edfc27f2cfa990dd0f8b2bbc6f9472a50a839.tar.gz
patch: Use repr() with exceptions instead of str()
This gives more meaningful errors. (From OE-Core rev: 5b285796b618623289992faea1282f1822335239) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/patch.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass
index 87bcaf91a8..fdf3c633bc 100644
--- a/meta/classes/patch.bbclass
+++ b/meta/classes/patch.bbclass
@@ -150,12 +150,12 @@ python patch_do_patch() {
150 patchset.Import({"file":local, "strippath": parm['striplevel']}, True) 150 patchset.Import({"file":local, "strippath": parm['striplevel']}, True)
151 except Exception as exc: 151 except Exception as exc:
152 bb.utils.remove(process_tmpdir, True) 152 bb.utils.remove(process_tmpdir, True)
153 bb.fatal("Importing patch '%s' with striplevel '%s'\n%s" % (parm['patchname'], parm['striplevel'], str(exc))) 153 bb.fatal("Importing patch '%s' with striplevel '%s'\n%s" % (parm['patchname'], parm['striplevel'], repr(exc)))
154 try: 154 try:
155 resolver.Resolve() 155 resolver.Resolve()
156 except bb.BBHandledException as e: 156 except bb.BBHandledException as e:
157 bb.utils.remove(process_tmpdir, True) 157 bb.utils.remove(process_tmpdir, True)
158 bb.fatal("Applying patch '%s' on target directory '%s'\n%s" % (parm['patchname'], patchdir, str(e))) 158 bb.fatal("Applying patch '%s' on target directory '%s'\n%s" % (parm['patchname'], patchdir, repr(e)))
159 159
160 bb.utils.remove(process_tmpdir, True) 160 bb.utils.remove(process_tmpdir, True)
161 del os.environ['TMPDIR'] 161 del os.environ['TMPDIR']