Use the formatflowed
library to convert such text to 'regular' text:
from formatflowed import convertToWrapped
text = convertToWrapped(msg.get_payload(), character_set=msg.get_charset())
Do note that you need to pass in a byte string, not a unicode
value; the library decodes to Unicode for you.
Obligatory disclaimer: I am the author of that library, albeit quite some time ago now.