Fix tests issues.
authorfunilrys <redacted>
Wed, 28 Feb 2018 22:24:58 +0000 (23:24 +0100)
committerfunilrys <redacted>
Wed, 28 Feb 2018 22:24:58 +0000 (23:24 +0100)
This patch fixes:
 * https://travis-ci.org/funilrys/hosts/jobs/347500695#L400
 * https://travis-ci.org/funilrys/hosts/jobs/347500695#L401

updateHostsFile.py

index 952624735312e45271796a61efcb9909b5de3b25..0482d8a60d42b4ca128818d75ac41614a23b7d70 100644 (file)
@@ -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)
git clone https://git.99rst.org/PROJECT