From e81da07191d61d6a7949ab0f3f49ef80611fcce3 Mon Sep 17 00:00:00 2001 From: jichenjc Date: Fri, 28 Apr 2017 20:00:50 +0800 Subject: [PATCH] Fix log debug error log debug lead to TypeError now, we need use dict mode Change-Id: Ib40c7a65a6c09154f36fe8c80a74c230811c4c45 --- nova_zvm/virt/zvm/dist.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nova_zvm/virt/zvm/dist.py b/nova_zvm/virt/zvm/dist.py index 15f1973..f973ca4 100644 --- a/nova_zvm/virt/zvm/dist.py +++ b/nova_zvm/virt/zvm/dist.py @@ -56,8 +56,9 @@ class LinuxDist(object): base_vdev, device_num) target_net_conf_file_name = file_path + file_name cfg_str_for_log = cfg_str.replace('\n', ' ') - LOG.debug('Network configure file[%s] content is: %s', - (target_net_conf_file_name, cfg_str_for_log)) + LOG.debug('Network configure file[%(file)s] content is: %(cfg)s', + {'file': target_net_conf_file_name, + 'cfg': cfg_str_for_log}) cfg_files.append((target_net_conf_file_name, cfg_str)) udev_cfg_str += self._get_udev_configuration(device_num, '0.0.' + str(base_vdev).zfill(4))