diff options
| author | Scott Moser <smoser@ubuntu.com> | 2011-09-19 18:13:08 -0400 |
|---|---|---|
| committer | Scott Moser <smoser@ubuntu.com> | 2011-09-19 18:13:08 -0400 |
| commit | cd392de955e442d93cfca6efab8a51d64e7f9940 (patch) | |
| tree | 71edf01cd01a2794dbd3eae751c60eff9e71b5ae | |
| parent | cb363ba54a55f0f73eae741701dc2256d571b802 (diff) | |
| download | nova-cd392de955e442d93cfca6efab8a51d64e7f9940.tar.gz nova-cd392de955e442d93cfca6efab8a51d64e7f9940.tar.xz nova-cd392de955e442d93cfca6efab8a51d64e7f9940.zip | |
use dictionary format for exception message
| -rw-r--r-- | nova/virt/images.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/virt/images.py b/nova/virt/images.py index 3aee83e2d..3ea579c7a 100644 --- a/nova/virt/images.py +++ b/nova/virt/images.py @@ -76,9 +76,10 @@ def fetch_to_raw(context, image_href, path, _user_id, _project_id): if fmt != "raw": staged = "%s.converted" % path if "backing file" in data: + backing_file = data['backing file'] raise exception.ImageUnacceptable(image_id=image_href, - reason=_("Dangerous! fmt=%s with backing file: %s") % - (fmt, data['backing file'])) + reason=_("Dangerous! fmt=%(fmt) backed by: %(backing_file)") % + locals) LOG.debug("%s was %s, converting to raw" % (image_href, fmt)) out, err = utils.execute('qemu-img', 'convert', '-O', 'raw', |
