summaryrefslogtreecommitdiff
path: root/prettytable/prettytable.py
diff options
context:
space:
mode:
Diffstat (limited to 'prettytable/prettytable.py')
-rw-r--r--prettytable/prettytable.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/prettytable/prettytable.py b/prettytable/prettytable.py
index 96b94bf..02dab66 100644
--- a/prettytable/prettytable.py
+++ b/prettytable/prettytable.py
@@ -302,7 +302,7 @@ class PrettyTable(object):
try:
assert int(val) >= 0
except AssertionError:
- raise Exception("Invalid value for %s: %s!" % (name, self._unicode(val)))
+ raise Exception("Invalid value for {}: {}!".format(name, self._unicode(val)))
def _validate_true_or_false(self, name, val):
try:
@@ -1499,7 +1499,7 @@ class PrettyTable(object):
open_tag.append("<table")
if options["attributes"]:
for attr_name in options["attributes"]:
- open_tag.append(" %s=\"%s\"" % (attr_name, options["attributes"][attr_name]))
+ open_tag.append(" {}=\"{}\"".format(attr_name, options["attributes"][attr_name]))
open_tag.append(">")
lines.append("".join(open_tag))
@@ -1566,7 +1566,7 @@ class PrettyTable(object):
open_tag.append(" frame=\"vsides\" rules=\"cols\"")
if options["attributes"]:
for attr_name in options["attributes"]:
- open_tag.append(" %s=\"%s\"" % (attr_name, options["attributes"][attr_name]))
+ open_tag.append(" {}=\"{}\"".format(attr_name, options["attributes"][attr_name]))
open_tag.append(">")
lines.append("".join(open_tag))