mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +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
|
@staticmethod
|
||||||
def ensure_dir_exists(path):
|
def ensure_dir_exists(path):
|
||||||
if not os.path.isdir(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)
|
assert os.path.isdir(path)
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user