fix build fail
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
9817e3e621
commit
0cb2cf6cb4
2 changed files with 6 additions and 4 deletions
|
@ -47,9 +47,10 @@ def guess_mbedtls_root():
|
|||
Return the first possible mbedTLS root directory
|
||||
"""
|
||||
dirs = set({})
|
||||
for i in inspect.stack():
|
||||
path = os.path.dirname(i.filename)
|
||||
for d in ['.', os.path.pardir, os.path.join(*([os.path.pardir]*2))]:
|
||||
for frame in inspect.stack():
|
||||
path = os.path.dirname(frame.filename)
|
||||
for d in ['.', os.path.pardir] \
|
||||
+ [os.path.join(*([os.path.pardir]*i)) for i in range(2, 10)]:
|
||||
d = os.path.abspath(os.path.join(path, d))
|
||||
if d in dirs:
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue