<s> import email <EOL> import six <EOL> if six . PY3 : <EOL> from email . errors import MessageParseError <EOL> else : <EOL> from email . Errors import MessageParseError <EOL> class EmailTransport ( object ) : <EOL> def get_email_from_bytes ( self , contents ) : <EOL> if six . PY3 : <EOL> message = email . message_from_bytes ( contents ) <EOL> else : <EOL> message = email . message_from_string ( contents ) <EOL> return message </s>
