From 6bde383b4e539000a6dd0ec52763b6d09f4c870e Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Wed, 26 Jun 2013 16:23:44 +0100 Subject: fix invalid logging Logging parameters were passed as a tuple, yielding: TypeError: not enough arguments for format string fixes bug 1194917 Change-Id: Ifec893e1e4551f28849b96c7b1bf3c929b708b4d --- nova/virt/xenapi/volume_utils.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/nova/virt/xenapi/volume_utils.py b/nova/virt/xenapi/volume_utils.py index 7a0b4a67e..853bc3262 100644 --- a/nova/virt/xenapi/volume_utils.py +++ b/nova/virt/xenapi/volume_utils.py @@ -233,8 +233,16 @@ def parse_volume_info(connection_data): target_host = _get_target_host(target_portal) target_port = _get_target_port(target_portal) target_iqn = connection_data['target_iqn'] - LOG.debug('(vol_id,number,host,port,iqn): (%s,%s,%s,%s)', - (volume_id, target_host, target_port, target_iqn)) + + log_params = { + "vol_id": volume_id, + "host": target_host, + "port": target_port, + "iqn": target_iqn + } + LOG.debug(_('(vol_id,host,port,iqn): ' + '(%(vol_id)s,%(host)s,%(port)s,%(iqn)s)'), log_params) + if (volume_id is None or target_host is None or target_iqn is None): -- cgit