diff --git a/_modules/index.html b/_modules/index.html
index 029e569..afa6857 100644
--- a/_modules/index.html
+++ b/_modules/index.html
@@ -8,7 +8,7 @@
-
Overview: module code — parsedmarc 6.1.5 documentation
+ Overview: module code — parsedmarc 6.1.6 documentation
@@ -58,7 +58,7 @@
- 6.1.5
+ 6.1.6
diff --git a/_modules/parsedmarc.html b/_modules/parsedmarc.html
index 6d21993..f55bd95 100644
--- a/_modules/parsedmarc.html
+++ b/_modules/parsedmarc.html
@@ -8,7 +8,7 @@
- parsedmarc — parsedmarc 6.1.5 documentation
+ parsedmarc — parsedmarc 6.1.6 documentation
@@ -58,7 +58,7 @@
- 6.1.5
+ 6.1.6
@@ -185,7 +185,7 @@
from parsedmarc.utils import timestamp_to_human, human_timestamp_to_datetime
from parsedmarc.utils import parse_email
-__version__ = "6.1.5"
+__version__ = "6.1.6"
logging.basicConfig(
format='%(levelname)8s:%(filename)s:%(lineno)d:'
diff --git a/_modules/parsedmarc/elastic.html b/_modules/parsedmarc/elastic.html
index de25203..8692655 100644
--- a/_modules/parsedmarc/elastic.html
+++ b/_modules/parsedmarc/elastic.html
@@ -8,7 +8,7 @@
- parsedmarc.elastic — parsedmarc 6.1.5 documentation
+ parsedmarc.elastic — parsedmarc 6.1.6 documentation
@@ -58,7 +58,7 @@
- 6.1.5
+ 6.1.6
diff --git a/_modules/parsedmarc/splunk.html b/_modules/parsedmarc/splunk.html
index b3e9c44..b38efcb 100644
--- a/_modules/parsedmarc/splunk.html
+++ b/_modules/parsedmarc/splunk.html
@@ -8,7 +8,7 @@
- parsedmarc.splunk — parsedmarc 6.1.5 documentation
+ parsedmarc.splunk — parsedmarc 6.1.6 documentation
@@ -58,7 +58,7 @@
- 6.1.5
+ 6.1.6
diff --git a/_modules/parsedmarc/utils.html b/_modules/parsedmarc/utils.html
index f459370..40c41fd 100644
--- a/_modules/parsedmarc/utils.html
+++ b/_modules/parsedmarc/utils.html
@@ -8,7 +8,7 @@
- parsedmarc.utils — parsedmarc 6.1.5 documentation
+ parsedmarc.utils — parsedmarc 6.1.6 documentation
@@ -58,7 +58,7 @@
- 6.1.5
+ 6.1.6
@@ -421,13 +421,19 @@
# Use a browser-like user agent string to bypass some proxy blocks
headers = {"User-Agent": USER_AGENT}
original_filename = "GeoLite2-Country.mmdb"
- tar_bytes = requests.get(url, headers=headers).content
- tar_file = tarfile.open(fileobj=BytesIO(tar_bytes), mode="r:gz")
- tar_dir = tar_file.getnames()[0]
- tar_path = "{0}/{1}".format(tar_dir, original_filename)
- tar_file.extract(tar_path)
- shutil.move(tar_path, location)
- shutil.rmtree(tar_dir)
+ try:
+ response = requests.get(url, headers=headers)
+ response.raise_for_status()
+ tar_bytes = response.content
+ tar_file = tarfile.open(fileobj=BytesIO(tar_bytes), mode="r:gz")
+ tar_dir = tar_file.getnames()[0]
+ tar_path = "{0}/{1}".format(tar_dir, original_filename)
+ tar_file.extract(tar_path)
+ shutil.move(tar_path, location)
+ shutil.rmtree(tar_dir)
+ except Exception as e:
+ logging.debug("Error downloading {0}: {1}".format(url,
+ e.__str__()))
system_paths = ["/usr/local/share/GeoIP/GeoLite2-Country.mmdb",
"/usr/share/GeoIP/GeoLite2-Country.mmdb"
@@ -443,6 +449,8 @@
db_path = os.path.join(tempdir, "GeoLite2-Country.mmdb")
if not os.path.exists(db_path):
download_country_database(db_path)
+ if not os.path.exists(db_path):
+ return None
else:
db_age = datetime.now() - datetime.fromtimestamp(
os.stat(db_path).st_mtime)
diff --git a/_static/documentation_options.js b/_static/documentation_options.js
index cfe14e4..8a14a26 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.1.5',
+ VERSION: '6.1.6',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
diff --git a/genindex.html b/genindex.html
index d659b22..5d44147 100644
--- a/genindex.html
+++ b/genindex.html
@@ -9,7 +9,7 @@
- Index — parsedmarc 6.1.5 documentation
+ Index — parsedmarc 6.1.6 documentation
@@ -59,7 +59,7 @@
- 6.1.5
+ 6.1.6
diff --git a/index.html b/index.html
index 44d517b..8922a85 100644
--- a/index.html
+++ b/index.html
@@ -8,7 +8,7 @@
- parsedmarc documentation - Open source DMARC report analyzer and visualizer — parsedmarc 6.1.5 documentation
+ parsedmarc documentation - Open source DMARC report analyzer and visualizer — parsedmarc 6.1.6 documentation
@@ -58,7 +58,7 @@
- 6.1.5
+ 6.1.6
diff --git a/objects.inv b/objects.inv
index 8b6b5d4..4635009 100644
Binary files a/objects.inv and b/objects.inv differ
diff --git a/py-modindex.html b/py-modindex.html
index 41a05fa..7085a1c 100644
--- a/py-modindex.html
+++ b/py-modindex.html
@@ -8,7 +8,7 @@
- Python Module Index — parsedmarc 6.1.5 documentation
+ Python Module Index — parsedmarc 6.1.6 documentation
@@ -61,7 +61,7 @@
- 6.1.5
+ 6.1.6
diff --git a/search.html b/search.html
index 57aa6ad..c7a855d 100644
--- a/search.html
+++ b/search.html
@@ -8,7 +8,7 @@
- Search — parsedmarc 6.1.5 documentation
+ Search — parsedmarc 6.1.6 documentation
@@ -59,7 +59,7 @@
- 6.1.5
+ 6.1.6