summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-03-13 20:13:17 +0000
committerGerrit Code Review <review@openstack.org>2015-03-13 20:13:17 +0000
commit26cbf7c124d892c8284ea44f0be572492ec77d6d (patch)
tree0ba1b260453a59395b69f05e77bf806a4771e80d
parent863fa283e60e335443f0b61e1e96db62a580ffb6 (diff)
parent592a6149fda13f4d8f30d3fb9c371c03418c9c31 (diff)
downloadnova-26cbf7c124d892c8284ea44f0be572492ec77d6d.tar.gz
Merge "libvirt: add in missing translation for exception"
-rw-r--r--nova/virt/libvirt/config.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/virt/libvirt/config.py b/nova/virt/libvirt/config.py
index 427bac053e..b36051cf84 100644
--- a/nova/virt/libvirt/config.py
+++ b/nova/virt/libvirt/config.py
@@ -31,6 +31,7 @@ from oslo_utils import units
import six
from nova import exception
+from nova.i18n import _
from nova.pci import utils as pci_utils
from nova.virt import hardware
@@ -71,9 +72,9 @@ class LibvirtConfigObject(object):
def parse_dom(self, xmldoc):
if self.root_name != xmldoc.tag:
- raise exception.InvalidInput(
- "Root element name should be '%s' not '%s'"
- % (self.root_name, xmldoc.tag))
+ msg = (_("Root element name should be '%(name)s' not '%(tag)s'") %
+ {'name': self.root_name, 'tag': xmldoc.tag})
+ raise exception.InvalidInput(msg)
def to_xml(self, pretty_print=True):
root = self.format_dom()