mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
classes: Use modern exception raising syntax
Modern expection rasing syntax is function call format, convert to this to keep python 3 happy and model correct coding style in the core. (From OE-Core rev: f4b382754603d3f1caa13824bcc8d06b568bbc59) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -128,9 +128,9 @@ def update_alternatives_after_parse(d):
|
||||
alt_path = d.getVar('ALTERNATIVE_PATH', True)
|
||||
alt_link = d.getVar('ALTERNATIVE_LINK', True) or ("%s/%s" % (d.getVar('bindir', True), alt_name))
|
||||
if alt_name == None:
|
||||
raise bb.build.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_NAME" % d.getVar('FILE')
|
||||
raise bb.build.build.FuncFailed("%s inherits update-alternatives but doesn't set ALTERNATIVE_NAME" % d.getVar('FILE'))
|
||||
if alt_path == None:
|
||||
raise bb.build.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_PATH" % d.getVar('FILE')
|
||||
raise bb.build.build.FuncFailed("%s inherits update-alternatives but doesn't set ALTERNATIVE_PATH" % d.getVar('FILE'))
|
||||
|
||||
alternative = d.getVar('ALTERNATIVE_%s' % pn, True) or ""
|
||||
alternative += " " + alt_name
|
||||
|
||||
Reference in New Issue
Block a user