summaryrefslogtreecommitdiff
path: root/representer.py
diff options
context:
space:
mode:
Diffstat (limited to 'representer.py')
-rw-r--r--representer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/representer.py b/representer.py
index 859887c..946a909 100644
--- a/representer.py
+++ b/representer.py
@@ -389,7 +389,7 @@ class SafeRepresenter(BaseRepresenter):
def represent_undefined(self, data):
# type: (Any) -> None
- raise RepresenterError('cannot represent an object: %s' % data)
+ raise RepresenterError('cannot represent an object: %s' % (data,))
SafeRepresenter.add_representer(type(None), SafeRepresenter.represent_none)
@@ -573,7 +573,7 @@ class Representer(SafeRepresenter):
elif hasattr(data, '__reduce__'):
reduce = data.__reduce__()
else:
- raise RepresenterError('cannot represent object: %r' % data)
+ raise RepresenterError('cannot represent object: %r' % (data,))
reduce = (list(reduce) + [None] * 5)[:5]
function, args, state, listitems, dictitems = reduce
args = list(args)