]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix broken fetch_to_volume_format log message
authorEric Harney <eharney@redhat.com>
Tue, 31 Mar 2015 13:31:06 +0000 (09:31 -0400)
committerEric Harney <eharney@redhat.com>
Tue, 31 Mar 2015 13:43:42 +0000 (09:43 -0400)
Format arguments are not passed correctly, leading
to a "TypeError: not enough arguments for format string"
failure.

Fix the same issue introduced in hosts.py _list_hosts().

Closes-Bug: #1438607

Change-Id: Id2d4fe2eeb401361fac2ff24c3b04df7944aea9f

cinder/api/contrib/hosts.py
cinder/image/image_utils.py

index 382e95729f850c57e69ddd075de22aa6768fcb52..d26868905f75d5c713730b312f8d317ba9394678 100644 (file)
@@ -113,7 +113,7 @@ def _list_hosts(req, service=None):
         if host['disabled']:
             active = 'disabled'
         LOG.debug('status, active and update: %s, %s, %s',
-                  (status, active, host['updated_at']))
+                  status, active, host['updated_at'])
         hosts.append({'host_name': host['host'],
                       'service': host['topic'],
                       'zone': host['availability_zone'],
index 6224da6c89b355bfcefc1483fdba9c291e78cae6..6e5e2fb195bea539bfa42c18fc9415548e6f20f1 100644 (file)
@@ -312,8 +312,7 @@ def fetch_to_volume_format(context, image_service,
         # check via 'qemu-img info' that what we copied was in fact a raw
         # image and not a different format with a backing file, which may be
         # malicious.
-        LOG.debug("%s was %s, converting to %s ", (image_id, fmt,
-                                                   volume_format))
+        LOG.debug("%s was %s, converting to %s ", image_id, fmt, volume_format)
         convert_image(tmp, dest, volume_format,
                       run_as_root=run_as_root)