Merge "Add in missing translations for exceptions"

This commit is contained in:
Jenkins 2016-08-03 03:15:53 +00:00 committed by Gerrit Code Review
commit dc417194a1
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ class Transaction(api.Transaction):
attempts = 0
while True:
if attempts > 0 and self.timeout_exceeded():
raise RuntimeError("OVS transaction timed out")
raise RuntimeError(_("OVS transaction timed out"))
attempts += 1
# TODO(twilson) Make sure we don't loop longer than vsctl_timeout
txn = idl.Transaction(self.api.idl)

View File

@ -314,7 +314,7 @@ def is_cidr_host(cidr):
plain IP addresses specifically to avoid ambiguity.
"""
if '/' not in str(cidr):
raise ValueError("cidr doesn't contain a '/'")
raise ValueError(_("cidr doesn't contain a '/'"))
net = netaddr.IPNetwork(cidr)
if net.version == 4:
return net.prefixlen == n_const.IPv4_BITS