def msgconvert(email):
log.debug("<STR_LIT>")<EOL>temph, temp = tempfile.mkstemp(prefix="<STR_LIT>")<EOL>command = ["<STR_LIT>", "<STR_LIT>", temp, email]<EOL>try:<EOL><INDENT>if six.PY2:<EOL><INDENT>with open(os.devnull, "<STR_LIT:w>") as devnull:<EOL><INDENT>out = subprocess.Popen(<EOL>command, stdin=subprocess.PIPE,<EOL>stdout=subprocess.PIPE, stderr=devnull)<EOL><DEDENT><DEDENT>elif six.PY3:<EOL><INDENT>out = subprocess.Popen(<EOL>command, stdin=subprocess.PIPE,<EOL>stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)<EOL><DEDENT><DEDENT>except OSError:<EOL><INDENT>message = "<STR_LIT>"<EOL>log.exception(message)<EOL>raise MailParserOSError(message)<EOL><DEDENT>else:<EOL><INDENT>stdoutdata, _ = out.communicate()<EOL>return temp, stdoutdata.decode("<STR_LIT:utf-8>").strip()<EOL><DEDENT>finally:<EOL><INDENT>os.close(temph)<EOL><DEDENT>
Exec msgconvert tool, to convert msg Outlook
mail in eml mail format

Args:
    email (string): file path of Outlook msg mail

Returns:
    tuple with file path of mail converted and
    standard output data (unicode Python 2, str Python 3)