]> code.ossystems Code Review - openembedded-core.git/commit
populate_sdk_ext.bbclass: don't rename layers when failed
authorRobert Yang <liezhi.yang@windriver.com>
Sun, 15 Oct 2017 19:30:43 +0000 (03:30 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 6 Jan 2018 10:13:39 +0000 (10:13 +0000)
commit32126512349d65f0dbc31196c4ec6e1a1147cf5e
treeb5ad9f0bbdaf1f8aae79de9cd6edce97a77bdae0
parent65b2a0e1ba7e176f3e405ed8968665660fc414d3
populate_sdk_ext.bbclass: don't rename layers when failed

The previous code:
os.rename(sdkbasepath, temp_sdkbasepath)
try:
    foo
finally:
    os.rename(temp_sdkbasepath, sdkbasepath)

always renamed the path, it made the debug harder when error happened.
drop the "try: finally" makes the debug easier.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/populate_sdk_ext.bbclass