Handle exception messages with six.text_type

Handle exception messages with six.text_type instead of using
`str`. This is required to prevent of entering bytes to a database and
prevent unexpected behavior of database and database driver.

Change-Id: Idb54ee271cfb09e8523e357674b598b11704742c
Closes-Bug: #1273301
Merge "Handle exception messages with six.text_type"