summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-09-19 17:10:48 -0400
committerScott Moser <smoser@ubuntu.com>2011-09-19 17:10:48 -0400
commitcb363ba54a55f0f73eae741701dc2256d571b802 (patch)
treec112c49498edc962dff0e8c2879513292610fe42
parentff9d353b2f4fee469e530fbc8dc231a41f6fed84 (diff)
use '_(' for exception messages
-rw-r--r--nova/virt/images.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/virt/images.py b/nova/virt/images.py
index c8a95bb00..3aee83e2d 100644
--- a/nova/virt/images.py
+++ b/nova/virt/images.py
@@ -71,13 +71,13 @@ def fetch_to_raw(context, image_href, path, _user_id, _project_id):
fmt = data.get("file format", None)
if fmt == None:
raise exception.ImageUnacceptable(
- reason="'qemu-img info' parsing failed.", image_id=image_href)
+ reason=_("'qemu-img info' parsing failed."), image_id=image_href)
if fmt != "raw":
staged = "%s.converted" % path
if "backing file" in data:
raise exception.ImageUnacceptable(image_id=image_href,
- reason="Dangerous! fmt=%s with backing file: %s" %
+ reason=_("Dangerous! fmt=%s with backing file: %s") %
(fmt, data['backing file']))
LOG.debug("%s was %s, converting to raw" % (image_href, fmt))
@@ -88,7 +88,7 @@ def fetch_to_raw(context, image_href, path, _user_id, _project_id):
data = _qemu_img_info(staged)
if data.get('file format', None) != "raw":
raise exception.ImageUnacceptable(image_id=image_href,
- reason="Dangerous! Converted to raw, but format is now %s" %
+ reason=_("Dangerous! Converted to raw, but format is now %s") %
data.get('file format', None))
os.rename(staged, path)