Skip to content

Commit

Permalink
PYTHON-976 - Use str(exception) instead of exception.message to suppo…
Browse files Browse the repository at this point in the history
…rt Python 3.
  • Loading branch information
Luke Lovett committed Oct 7, 2015
1 parent 22c79ac commit 875251c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymongo/message.py
Expand Up @@ -84,7 +84,7 @@ def _maybe_add_read_preference(spec, read_preference):

def _convert_exception(exception):
"""Convert an Exception into a failure document for publishing."""
return {'errmsg': exception.message,
return {'errmsg': str(exception),
'errtype': exception.__class__.__name__}


Expand Down

0 comments on commit 875251c

Please sign in to comment.