Skip to content

Commit 7d3fc1e

Browse files
committed
Catch exception if folder already exists
1 parent 6987d6c commit 7d3fc1e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

platformio/package/manager/base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ def is_system_compatible(value):
9191
@staticmethod
9292
def ensure_dir_exists(path):
9393
if not os.path.isdir(path):
94-
os.makedirs(path)
94+
try:
95+
os.makedirs(path)
96+
except: # pylint: disable=bare-except
97+
pass
9598
assert os.path.isdir(path)
9699
return path
97100

0 commit comments

Comments
 (0)