Makedirs only throws oserror, so only catch that
The docs state this only throws OSError so we might as well just catch only that vs its parent class. Change-Id: I829996caf7ff256ff4949b8e1e0f27e233bab467
This commit is contained in:
parent
115a39a3cf
commit
18e31db320
|
@ -146,7 +146,7 @@ def ensure_tree(path):
|
|||
"""
|
||||
try:
|
||||
os.makedirs(path)
|
||||
except EnvironmentError as e:
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST or not os.path.isdir(path):
|
||||
raise
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue