From 9380fe534ee6dc27adc6ecb1d6828669f603c52e Mon Sep 17 00:00:00 2001 From: Alexander Cecile <35971201+AlexanderCecile@users.noreply.github.com> Date: Fri, 21 Aug 2020 14:44:27 -0400 Subject: [PATCH] Tweak output formatting of get_file_by_url --- updateHostsFile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/updateHostsFile.py b/updateHostsFile.py index cace08485..cee883237 100644 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -1482,10 +1482,10 @@ def get_file_by_url(url, params=None, **kwargs): ------- content: str """ - + req = requests.get(url=url, params=params, **kwargs) req.encoding = req.apparent_encoding - res_text = "\n".join([domain_to_idna(line) for line in req.text.splitlines()]) + "\n" + res_text = "\n".join([domain_to_idna(line) for line in req.text.split("\n")]) return res_text