aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Rosa <andre.rosa@lge.com>2019-04-11 20:20:54 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-11 21:37:18 +0100
commita8d9b82ccf93dcb74258693f62d88be380b1c0b7 (patch)
tree6fef7409de078c2d6f98310e32f9707281f3cbcd
parent57e765e38c6382a9b36d5ee2a6f3fa96ac905b82 (diff)
downloadbitbake-a8d9b82ccf93dcb74258693f62d88be380b1c0b7.tar.gz
utils: Let mkdirhier fail if existing path is not a folder
Let mkdirhier fail if existing path is not a folder instead of assuming a directory hierarchy already exists. Signed-off-by: Andre Rosa <andre.rosa@lge.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index d186b1fa2..a3f75fbe9 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -734,7 +734,7 @@ def mkdirhier(directory):
try:
os.makedirs(directory)
except OSError as e:
- if e.errno != errno.EEXIST:
+ if e.errno != errno.EEXIST or not os.path.isdir(directory):
raise e
def movefile(src, dest, newmtime = None, sstat = None):