From eb04079860ffed6caf2268759bd0afca42d30dd5 Mon Sep 17 00:00:00 2001 From: Luong Anh Tuan Date: Thu, 15 Dec 2016 12:16:39 +0700 Subject: [PATCH] Use oslo_serialization.base64 to follow OpenStack Python3 This patch replaces python standard base64 library call to oslo_serialization.base64 to follow OpenStack Python3 porting standard [1], since the requirements.txt has already defined oslo.serialization>=1.10.0. [1] https://wiki.openstack.org/wiki/Python3 Change-Id: I148778ebcccecdb04824c6982b184400ec189084 --- ironic/drivers/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ironic/drivers/utils.py b/ironic/drivers/utils.py index f199743478..6247e1fb13 100644 --- a/ironic/drivers/utils.py +++ b/ironic/drivers/utils.py @@ -12,12 +12,12 @@ # License for the specific language governing permissions and limitations # under the License. -import base64 import os import tempfile from oslo_config import cfg from oslo_log import log as logging +from oslo_serialization import base64 from oslo_utils import timeutils import six @@ -292,7 +292,7 @@ def store_ramdisk_logs(node, logs): """ logs_file_name = get_ramdisk_logs_file_name(node) - data = base64.b64decode(logs) + data = base64.decode_as_bytes(logs) if CONF.agent.deploy_logs_storage_backend == 'local': if not os.path.exists(CONF.agent.deploy_logs_local_path):