Remove the ensure_dir

The utils.file.ensure_dir is deprecated for removal in version Ocata.
ensure_tree(path, 0o755) from the oslo_utils.fileutils can be used
instead.

Depends-On: Ic9b4b86e65052c06c33c8628bb0c6700cdfd875b
Change-Id: Ifff970d80acb7ef28cb7fc67d3ae0c5524de1bc3
Closes-Bug: #1733757
This commit is contained in:
chenghuiyu 2017-11-22 18:01:01 +08:00
parent 618ee8658f
commit e2ad828e0f
1 changed files with 0 additions and 9 deletions

View File

@ -31,7 +31,6 @@ import time
import uuid
import weakref
from debtcollector import removals
import eventlet
from eventlet.green import subprocess
import netaddr
@ -41,7 +40,6 @@ from oslo_config import cfg
from oslo_db import exception as db_exc
from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import fileutils
import six
import neutron
@ -105,13 +103,6 @@ def throttler(threshold=DEFAULT_THROTTLER_VALUE):
return decorator
@removals.remove(
message="Use ensure_tree(path, 0o755) from oslo_utils.fileutils")
def ensure_dir(dir_path):
"""Ensure a directory with 755 permissions mode."""
fileutils.ensure_tree(dir_path, mode=0o755)
def _subprocess_setup():
# Python installs a SIGPIPE handler by default. This is usually not what
# non-Python subprocesses expect.