1000145: Fix deprecated exception message warning.

Base exception message has been deprecated since Python 2.6.