summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi NATSUME <natsume.takashi@lab.ntt.co.jp>2017-04-20 22:20:58 +0900
committerTakashi NATSUME <natsume.takashi@lab.ntt.co.jp>2017-06-06 13:39:36 +0900
commitd95290e1ef5fa311e2bd3965aedb3e07dd57f502 (patch)
tree2e8ae7f22f3969092ffa11c522d804439a9a971c
parent6cf1bc7a06c8e0b1a2fee926b9a825afaccd242d (diff)
downloadoslo-config-d95290e1ef5fa311e2bd3965aedb3e07dd57f502.tar.gz
Fix string interpolation in ValueError3.22.1
Change-Id: Ief34fbf75a28c46b95c08a4d7ae2cb831607a05b Closes-Bug: #1684771 (cherry-picked from commit 4cc7c6cb9bd96c986680241bbf2d3d454bcba246)
-rw-r--r--oslo_config/types.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/oslo_config/types.py b/oslo_config/types.py
index 6cb84e2..7107518 100644
--- a/oslo_config/types.py
+++ b/oslo_config/types.py
@@ -397,10 +397,10 @@ class Port(Integer):
min = self.PORT_MIN if min is None else min
max = self.PORT_MAX if max is None else max
if min < self.PORT_MIN:
- raise ValueError('Min value cannot be less than %(min)d',
+ raise ValueError('Min value cannot be less than %(min)d' %
{'min': self.PORT_MIN})
if max > self.PORT_MAX:
- raise ValueError('Max value cannot be more than %(max)d',
+ raise ValueError('Max value cannot be more than %(max)d' %
{'max': self.PORT_MAX})
super(Port, self).__init__(min=min, max=max, type_name=type_name,
@@ -796,7 +796,7 @@ class HostAddress(object):
try:
value = self.hostname(value)
except ValueError:
- raise ValueError("%s is not a valid host address", value)
+ raise ValueError("%s is not a valid host address" % (value,))
return value
def __repr__(self):