Commit 4de039eb authored by Leo Pound Singer's avatar Leo Pound Singer

Update ValueError test to adapt to Python 3 changes

Apparently ValueError no longer has a 'message' property.
Original: b94f8e7635bc2bf6465a460f3172cc3387cada90
parent c89de0d6
......@@ -49,7 +49,7 @@ def _add_newdoc_ufunc(func, doc):
try:
np.lib.add_newdoc_ufunc(func, doc)
except ValueError as e:
if e.message == 'Cannot change docstring of ufunc with non-NULL docstring':
if e.args[0] == 'Cannot change docstring of ufunc with non-NULL docstring':
pass
......
......@@ -44,7 +44,7 @@ def _add_newdoc_ufunc(func, doc):
try:
np.lib.add_newdoc_ufunc(func, doc)
except ValueError as e:
if e.message == 'Cannot change docstring of ufunc with non-NULL docstring':
if e.args[0] == 'Cannot change docstring of ufunc with non-NULL docstring':
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment