Merge "Add in missing translations for exceptions"
This commit is contained in:
commit
dc417194a1
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user