ENG-6893 - Fix deprecation warning in some Pythons re. exception.message.