diff options
| author | ChangBo Guo(gcb) <eric.guo@easystack.cn> | 2016-09-25 10:22:00 +0800 |
|---|---|---|
| committer | ChangBo Guo(gcb) <eric.guo@easystack.cn> | 2016-09-25 10:53:52 +0800 |
| commit | e34bd5f5d9c60ce49c6e249ebe2e29c8cfbbbb01 (patch) | |
| tree | f2c200b34e2533c92353e0b099f041da0e977dc8 /taskflow/utils | |
| parent | e8b1d580912a228d990e496663ddb16ce10db724 (diff) | |
| download | taskflow-e34bd5f5d9c60ce49c6e249ebe2e29c8cfbbbb01.tar.gz | |
Use method ensure_tree from oslo.utils
Oslo.utils provides same function and just use it.
Change-Id: Iac245d4d98c41edea5294a4d8842db69a42b3794
Diffstat (limited to 'taskflow/utils')
| -rw-r--r-- | taskflow/utils/misc.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/taskflow/utils/misc.py b/taskflow/utils/misc.py index ef121df..421449d 100644 --- a/taskflow/utils/misc.py +++ b/taskflow/utils/misc.py @@ -18,7 +18,6 @@ import collections import contextlib import datetime -import errno import inspect import os import re @@ -467,24 +466,6 @@ def as_int(obj, quiet=False): return obj -# Taken from oslo-incubator file-utils but since that module pulls in a large -# amount of other files it does not seem so useful to include that full -# module just for this function. -def ensure_tree(path): - """Create a directory (and any ancestor directories required). - - :param path: Directory to create - """ - try: - os.makedirs(path) - except OSError as e: - if e.errno == errno.EEXIST: - if not os.path.isdir(path): - raise - else: - raise - - @contextlib.contextmanager def capture_failure(): """Captures the occurring exception and provides a failure object back. |
