mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-04 15:28:27 +01:00
cloud: makedirs: catch exception instead of checking in advance
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
+4
-1
@@ -125,8 +125,11 @@ class DataCloudBase(object):
|
||||
|
||||
def _makedirs(self, fname):
|
||||
dname = os.path.dirname(fname)
|
||||
if not os.path.exists(dname):
|
||||
try:
|
||||
os.makedirs(dname)
|
||||
except OSError as e:
|
||||
if e.errno != os.errno.EEXIST:
|
||||
raise
|
||||
|
||||
def _pull_key(self, key, path):
|
||||
""" Cloud-specific method of pulling keys """
|
||||
|
||||
Reference in New Issue
Block a user