summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2016-08-13 20:21:14 -0700
committerJoshua Harlow <harlowja@gmail.com>2016-08-13 20:21:38 -0700
commit18e31db320ffda97a8c3d81d3b89132f1fb3be93 (patch)
treeada591d7337ac202d33a9e85c4eab748ea8742d3
parent115a39a3cf0275fb9f9f8d56cf06220ce1864fee (diff)
downloadtooz-18e31db320ffda97a8c3d81d3b89132f1fb3be93.tar.gz
Makedirs only throws oserror, so only catch that1.43.0
The docs state this only throws OSError so we might as well just catch only that vs its parent class. Change-Id: I829996caf7ff256ff4949b8e1e0f27e233bab467
-rw-r--r--tooz/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tooz/utils.py b/tooz/utils.py
index ec79954..d0a3eae 100644
--- a/tooz/utils.py
+++ b/tooz/utils.py
@@ -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