Catch exception if folder already exists

This commit is contained in:
Ivan Kravets
2020-09-09 18:38:55 +03:00
parent 6987d6c1c6
commit 7d3fc1ec1a

View File

@ -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