mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 00:32:14 +02:00
lib/oeqa/decorators: handle broken links when creating new symlink
When checking if a link exists before creating it, use os.path.lexists() as otherwise os.path.exists() on a broken link will return False. (From OE-Core rev: ec24b6de2b8686e1f779fef3a963e66f70eeba74) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
ebc80fa30a
commit
31cef0d518
@@ -190,7 +190,7 @@ def LogResults(original_class):
|
||||
local_log.results("Testcase "+str(test_case)+": PASSED")
|
||||
|
||||
# Create symlink to the current log
|
||||
if os.path.exists(linkfile):
|
||||
if os.path.lexists(linkfile):
|
||||
os.remove(linkfile)
|
||||
os.symlink(logfile, linkfile)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user