diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-14 11:54:59 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-16 17:35:01 +0100 |
commit | 5b285796b618623289992faea1282f1822335239 (patch) | |
tree | 5edb9ed5d7f77be7bfba878a7b34059c1346a450 | |
parent | 063d085534b7b3659c5721228bb58f4e8115b5ee (diff) | |
download | openembedded-core-contrib-5b285796b618623289992faea1282f1822335239.tar.gz |
patch: Use repr() with exceptions instead of str()
This gives more meaningful errors.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/patch.bbclass | 4 |
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() { 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'], str(exc))) + bb.fatal("Importing patch '%s' with striplevel '%s'\n%s" % (parm['patchname'], parm['striplevel'], repr(exc))) 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, str(e))) + bb.fatal("Applying patch '%s' on target directory '%s'\n%s" % (parm['patchname'], patchdir, repr(e))) bb.utils.remove(process_tmpdir, True) del os.environ['TMPDIR'] |