package.bbclass: Add a sanity check to the debugsrcdir removal code

(From OE-Core rev: 9f6b9d7d0402b883fc3ad3cdead40e838ce31a27)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2012-02-24 16:09:00 +00:00
parent f017b9b6b8
commit 7c46f0b109
1 changed files with 1 additions and 1 deletions

View File

@ -276,7 +276,7 @@ def splitfile2(debugsrcdir, d):
# Also remove debugsrcdir if its empty
for p in nosuchdir[::-1]:
if not os.listdir(p):
if os.path.exists(p) and not os.listdir(p):
os.rmdir(p)
def runstrip(file, elftype, d):