Fix ValueError with Python2.6
Exception.message is deprecated and throw an AttributeError in Python 3