aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/decorators.py
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-07-22 15:03:30 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-25 23:46:55 +0100
commitec24b6de2b8686e1f779fef3a963e66f70eeba74 (patch)
tree979245545059ff0070fea6c5e1790fae31180b8a /meta/lib/oeqa/utils/decorators.py
parent2718bb9f2eabc15e3ef7cb5d67f4331de4f751d6 (diff)
downloadopenembedded-core-contrib-ec24b6de2b8686e1f779fef3a963e66f70eeba74.tar.gz
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. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/decorators.py')
-rw-r--r--meta/lib/oeqa/utils/decorators.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index 0b23565485..615fd956b5 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -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)