mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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>
This commit is contained in:
@@ -150,12 +150,12 @@ python patch_do_patch() {
|
|||||||
patchset.Import({"file":local, "strippath": parm['striplevel']}, True)
|
patchset.Import({"file":local, "strippath": parm['striplevel']}, True)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
bb.utils.remove(process_tmpdir, True)
|
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:
|
try:
|
||||||
resolver.Resolve()
|
resolver.Resolve()
|
||||||
except bb.BBHandledException as e:
|
except bb.BBHandledException as e:
|
||||||
bb.utils.remove(process_tmpdir, True)
|
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)
|
bb.utils.remove(process_tmpdir, True)
|
||||||
del os.environ['TMPDIR']
|
del os.environ['TMPDIR']
|
||||||
|
|||||||
Reference in New Issue
Block a user