Fix .msg parsing CLI exception when msgconvert is not found in the system path

This commit is contained in:
Sean Whalen
2018-09-18 21:54:26 -04:00
parent db4e145b7a
commit 6b01fc0f3f
2 changed files with 3 additions and 4 deletions
+2
View File
@@ -7,6 +7,8 @@ Collector (HEC)
GeoIP DB to avoid being blocked by security proxies
- Reduce default DNS timeout to 2.0 seconds
- Add alignment booleans to JSON output
- Fix `.msg` parsing CLI exception when `msgconvert` is not found in the
system path
3.9.7
-----
+1 -4
View File
@@ -958,10 +958,7 @@ def parse_report_email(input_, nameservers=None, timeout=2.0):
with open(eml_path, "rb") as eml_file:
rfc822 = eml_file.read()
except FileNotFoundError:
raise FileNotFoundError(
"msgconvert not found. Please ensure it is installed\n"
"sudo apt install libemail-outlook-message-perl\n"
"https://github.com/mvz/email-outlook-message-perl")
raise ParserError("msgconvert utility not found")
finally:
os.chdir(orig_dir)
shutil.rmtree(tmp_dir)