diff --git a/.travis.yml b/.travis.yml index e1c7bde..56f75ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,6 @@ language: python sudo: true -services: - - elasticsearch - python: - '3.4' - '3.5' @@ -12,15 +9,20 @@ python: # commands to install dependencies before_install: - - "sudo apt-get install -y apt-transport-https" + - "sudo apt-get update" - "sudo apt-get install -y libemail-outlook-message-perl" + - "sudo apt-get install -y apt-transport-https systemd" + - "wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -" + - 'echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list' + - "sudo apt-get update" + - "sudo apt-get install -y default-jre-headless elasticsearch" + - "sudo systemctl daemon-reload" + - "sudo systemctl enable elasticsearch.service" + - "sudo service elastsearch start" install: - "pip install -r requirements.txt" -before_script: - - sleep 10 - # commands to run samples script: - "flake8 *.py parsedmarc/*.py" @@ -29,6 +31,7 @@ script: - "make html" - "cd .." - "python tests.py" + - "python setup.py install" - "parsedmarc --save-aggregate samples/aggregate/*" - "parsedmarc --save-forensic samples/forensic/*" - "python setup.py sdist" diff --git a/parsedmarc/utils.py b/parsedmarc/utils.py index a3870bf..f837e6c 100644 --- a/parsedmarc/utils.py +++ b/parsedmarc/utils.py @@ -23,7 +23,7 @@ import dns.exception import geoip2.database import geoip2.errors import requests -import publicsuffix +import publicsuffix2 __version__ = "4.3.9" @@ -99,7 +99,7 @@ def get_base_domain(domain): logger.warning( "Failed to download an updated PSL {0}".format(error)) with open(psl_path, encoding="utf-8") as psl_file: - psl = publicsuffix.PublicSuffixList(psl_file) + psl = publicsuffix2.PublicSuffixList(psl_file) return psl.get_public_suffix(domain)