Stop using deprecated access to message attribute

The message attribute has been deprecated. See:
http://legacy.python.org/dev/peps/pep-0352/#retracted-ideas