summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-25 16:04:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-26 12:08:08 +0100
commit26a7012e6e17e6b4b4478a25b1b2d5608fe77cfc (patch)
tree1ef91c15f134f9e9fca420a2a7cc4fcf6af4ef53
parentb9535f513366536b13d0522058f517d2e04451b5 (diff)
downloadopenembedded-core-26a7012e6e17e6b4b4478a25b1b2d5608fe77cfc.tar.gz
patch: Fix exception reporting with repr()
The exceptions generated with repre are more detailed but escaped the newlines making them unreadable. Fix this. 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 fdf3c633bc..8de7025491 100644
--- a/meta/classes/patch.bbclass
+++ b/meta/classes/patch.bbclass
@@ -150,12 +150,12 @@ python patch_do_patch() {
patchset.Import({"file":local, "strippath": parm['striplevel']}, True)
except Exception as exc:
bb.utils.remove(process_tmpdir, True)
- bb.fatal("Importing patch '%s' with striplevel '%s'\n%s" % (parm['patchname'], parm['striplevel'], repr(exc)))
+ bb.fatal("Importing patch '%s' with striplevel '%s'\n%s" % (parm['patchname'], parm['striplevel'], repr(exc).replace("\\n", "\n")))
try:
resolver.Resolve()
except bb.BBHandledException as e:
bb.utils.remove(process_tmpdir, True)
- bb.fatal("Applying patch '%s' on target directory '%s'\n%s" % (parm['patchname'], patchdir, repr(e)))
+ bb.fatal("Applying patch '%s' on target directory '%s'\n%s" % (parm['patchname'], patchdir, repr(e).replace("\\n", "\n")))
bb.utils.remove(process_tmpdir, True)
del os.environ['TMPDIR']