From 3403b10e50a65fc7b076059894c1b91e62f073e0 Mon Sep 17 00:00:00 2001 From: funilrys Date: Wed, 28 Feb 2018 23:24:58 +0100 Subject: [PATCH] Fix tests issues. This patch fixes: * https://travis-ci.org/funilrys/hosts/jobs/347500695#L400 * https://travis-ci.org/funilrys/hosts/jobs/347500695#L401 --- updateHostsFile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/updateHostsFile.py b/updateHostsFile.py index 952624735..0482d8a60 100644 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -1186,6 +1186,7 @@ def domain_to_idna(line): return line.encode("IDNA").decode("UTF-8") return line.encode("UTF-8").decode("UTF-8") + # Helper Functions def get_file_by_url(url): """ @@ -1210,7 +1211,7 @@ def get_file_by_url(url): try: f = urlopen(url) - soup = BeautifulSoup(f.read(),'lxml').get_text() + soup = BeautifulSoup(f.read(), 'lxml').get_text() return '\n'.join(list(map(domain_to_idna, soup.split('\n')))) except Exception: print("Problem getting file: ", url)