Skip to content

Commit 1987506

Browse files
added format function
1 parent 588b5b4 commit 1987506

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cycler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ def change_key(self, old, new):
185185
if old == new:
186186
return
187187
if new in self._keys:
188-
raise ValueError("Can't replace %s with %s, %s is already a key" %
189-
(old, new, new))
188+
raise ValueError("Can't replace {} with {}, {} is already a key"
189+
.format(old, new, new))
190190
if old not in self._keys:
191-
raise KeyError("Can't replace %s with %s, %s is not a key" %
192-
(old, new, old))
191+
raise KeyError("Can't replace {} with {}, {} is not a key"
192+
.format(old, new, old))
193193

194194
self._keys.remove(old)
195195
self._keys.add(new)

0 commit comments

Comments
 (0)