mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Catch exception if folder already exists
This commit is contained in:
@ -91,7 +91,10 @@ class BasePackageManager( # pylint: disable=too-many-public-methods
|
||||
@staticmethod
|
||||
def ensure_dir_exists(path):
|
||||
if not os.path.isdir(path):
|
||||
os.makedirs(path)
|
||||
try:
|
||||
os.makedirs(path)
|
||||
except: # pylint: disable=bare-except
|
||||
pass
|
||||
assert os.path.isdir(path)
|
||||
return path
|
||||
|
||||
|
Reference in New Issue
Block a user