Rename cinder.privsep.utils to cinder.privsep.path

Rename file to path because most of these functions in the
file have to do with filesystem paths and the like.

Change-Id: I709d8f8722c6a477e50d0ee7fd9a368a16fe9cca
Signed-off-by: Chuck Short <chucks@redhat.com>
This commit is contained in:
Chuck Short 2018-09-30 07:16:09 -04:00
parent 65d1e2bddc
commit 94641537b8
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ import six
from cinder import exception
from cinder.privsep import nvmcli
import cinder.privsep.utils
import cinder.privsep.path
from cinder import utils
from cinder.volume.targets import nvmeof
@ -192,7 +192,7 @@ class NVMET(nvmeof.NVMeOF):
# in order to avoid executing cat as root
with utils.temporary_chown(tmp_file_path):
try:
out = cinder.privsep.utils.readfile(tmp_file_path)
out = cinder.privsep.path.readfile(tmp_file_path)
except putils.ProcessExecutionError:
with excutils.save_and_reraise_exception():
LOG.exception('Failed to read: %s', tmp_file_path)
@ -208,6 +208,6 @@ class NVMET(nvmeof.NVMeOF):
def _delete_file(self, file_path):
try:
cinder.privsep.utils.removefile(file_path)
cinder.privsep.path.removefile(file_path)
except putils.ProcessExecutionError:
LOG.exception('Failed to delete file: %s', file_path)