From 11b9346edf25aed75184e03c7675e9cd14e5a37b Mon Sep 17 00:00:00 2001 From: Xi Yang Date: Tue, 3 Nov 2015 13:44:29 +0800 Subject: [PATCH] Replace warnings.warn in glusterfs There is a warning message logged by warnings.warn, it should be replaced by LOG.warn. Change-Id: Ia15d2cdfe6ed1b000a399bbdd0ccafe02aaa0197 --- cinder/volume/drivers/glusterfs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cinder/volume/drivers/glusterfs.py b/cinder/volume/drivers/glusterfs.py index dca3be615..5a865a372 100644 --- a/cinder/volume/drivers/glusterfs.py +++ b/cinder/volume/drivers/glusterfs.py @@ -16,7 +16,6 @@ import errno import os import stat -import warnings from os_brick.remotefs import remotefs as remotefs_brick from oslo_concurrency import processutils @@ -348,8 +347,9 @@ class GlusterfsDriver(remotefs_drv.RemoteFSSnapDriver, driver.CloneableVD, self._fallocate(volume_path, volume_size) except processutils.ProcessExecutionError as exc: if 'Operation not supported' in exc.stderr: - warnings.warn('Fallocate not supported by current version ' - 'of glusterfs. So falling back to dd.') + LOG.warning(_LW('Fallocate not supported by current ' + 'version of glusterfs. So falling ' + 'back to dd.')) self._create_regular_file(volume_path, volume_size) else: fileutils.delete_if_exists(volume_path) -- 2.45.2