diff --git a/_modules/index.html b/_modules/index.html
index a819977..98d91e2 100644
--- a/_modules/index.html
+++ b/_modules/index.html
@@ -8,7 +8,7 @@
-
Overview: module code — parsedmarc 6.7.0 documentation
+ Overview: module code — parsedmarc 6.7.1 documentation
@@ -58,7 +58,7 @@
- 6.7.0
+ 6.7.1
diff --git a/_modules/parsedmarc.html b/_modules/parsedmarc.html
index 83f0960..d79c758 100644
--- a/_modules/parsedmarc.html
+++ b/_modules/parsedmarc.html
@@ -8,7 +8,7 @@
- parsedmarc — parsedmarc 6.7.0 documentation
+ parsedmarc — parsedmarc 6.7.1 documentation
@@ -58,7 +58,7 @@
- 6.7.0
+ 6.7.1
@@ -180,7 +180,7 @@
from parsedmarc.utils import timestamp_to_human, human_timestamp_to_datetime
from parsedmarc.utils import parse_email
-__version__ = "6.7.0"
+__version__ = "6.7.1"
logging.basicConfig(
format='%(levelname)8s:%(filename)s:%(lineno)d:'
diff --git a/_modules/parsedmarc/elastic.html b/_modules/parsedmarc/elastic.html
index 4162b19..429fe08 100644
--- a/_modules/parsedmarc/elastic.html
+++ b/_modules/parsedmarc/elastic.html
@@ -8,7 +8,7 @@
- parsedmarc.elastic — parsedmarc 6.7.0 documentation
+ parsedmarc.elastic — parsedmarc 6.7.1 documentation
@@ -58,7 +58,7 @@
- 6.7.0
+ 6.7.1
diff --git a/_modules/parsedmarc/splunk.html b/_modules/parsedmarc/splunk.html
index 2a29ee3..ecb5f88 100644
--- a/_modules/parsedmarc/splunk.html
+++ b/_modules/parsedmarc/splunk.html
@@ -8,7 +8,7 @@
- parsedmarc.splunk — parsedmarc 6.7.0 documentation
+ parsedmarc.splunk — parsedmarc 6.7.1 documentation
@@ -58,7 +58,7 @@
- 6.7.0
+ 6.7.1
diff --git a/_modules/parsedmarc/utils.html b/_modules/parsedmarc/utils.html
index a6b2a64..83538ee 100644
--- a/_modules/parsedmarc/utils.html
+++ b/_modules/parsedmarc/utils.html
@@ -8,7 +8,7 @@
- parsedmarc.utils — parsedmarc 6.7.0 documentation
+ parsedmarc.utils — parsedmarc 6.7.1 documentation
@@ -58,7 +58,7 @@
- 6.7.0
+ 6.7.1
@@ -166,6 +166,7 @@
import platform
import atexit
import mailbox
+import re
import dateparser
import dns.reversename
@@ -181,6 +182,8 @@
platform.release(),
)
+parenthesis_regex = re.compile(r'\s*\(.*\)\s*')
+
null_file = open(os.devnull, "w")
logger = logging.getLogger("parsedmarc")
mailparser_logger = logging.getLogger("mailparser")
@@ -385,6 +388,8 @@
DateTime: The converted timestamp
"""
+ human_timestamp = human_timestamp.replace("-0000", "")
+ human_timestamp = parenthesis_regex.sub("", human_timestamp)
settings = {}
if to_utc:
@@ -469,14 +474,22 @@
if db_path is None:
db_path = os.path.join(tempdir, "GeoLite2-Country.mmdb")
if not os.path.exists(db_path):
- download_country_database(db_path)
+ try:
+ download_country_database()
+ except Exception as e:
+ logger.error(e.__str__())
+ return None
if not os.path.exists(db_path):
return None
else:
db_age = datetime.now() - datetime.fromtimestamp(
os.stat(db_path).st_mtime)
if db_age > timedelta(days=7):
- download_country_database()
+ try:
+ download_country_database()
+ except Exception as e:
+ logger.error(e.__str__())
+ return None
db_path = db_path
db_reader = geoip2.database.Reader(db_path)
diff --git a/_static/documentation_options.js b/_static/documentation_options.js
index 4e29528..209fc58 100644
--- a/_static/documentation_options.js
+++ b/_static/documentation_options.js
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
- VERSION: '6.7.0',
+ VERSION: '6.7.1',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
diff --git a/genindex.html b/genindex.html
index 87cfa17..5389e05 100644
--- a/genindex.html
+++ b/genindex.html
@@ -9,7 +9,7 @@
- Index — parsedmarc 6.7.0 documentation
+ Index — parsedmarc 6.7.1 documentation
@@ -59,7 +59,7 @@
- 6.7.0
+ 6.7.1
diff --git a/index.html b/index.html
index b38cbbb..45f546a 100644
--- a/index.html
+++ b/index.html
@@ -8,7 +8,7 @@
- parsedmarc documentation - Open source DMARC report analyzer and visualizer — parsedmarc 6.7.0 documentation
+ parsedmarc documentation - Open source DMARC report analyzer and visualizer — parsedmarc 6.7.1 documentation
@@ -58,7 +58,7 @@
- 6.7.0
+ 6.7.1
diff --git a/objects.inv b/objects.inv
index 85f0ec6..3dbb726 100644
Binary files a/objects.inv and b/objects.inv differ
diff --git a/py-modindex.html b/py-modindex.html
index 0e86862..abfc4b1 100644
--- a/py-modindex.html
+++ b/py-modindex.html
@@ -8,7 +8,7 @@
- Python Module Index — parsedmarc 6.7.0 documentation
+ Python Module Index — parsedmarc 6.7.1 documentation
@@ -61,7 +61,7 @@
- 6.7.0
+ 6.7.1
diff --git a/search.html b/search.html
index 5eb92d0..c4d3304 100644
--- a/search.html
+++ b/search.html
@@ -8,7 +8,7 @@
- Search — parsedmarc 6.7.0 documentation
+ Search — parsedmarc 6.7.1 documentation
@@ -59,7 +59,7 @@
- 6.7.0
+ 6.7.1