From d04271705b3a530f9e975fc1e9c13c43a766261b Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Wed, 11 Dec 2019 15:26:58 -0600 Subject: [PATCH] update-sources: python 3 fixup Open index in binary mode to fix encoding issue on Python 3.6 on CentOS 7. --- suricata/update/commands/updatesources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suricata/update/commands/updatesources.py b/suricata/update/commands/updatesources.py index 25f6e3e..a47c24c 100644 --- a/suricata/update/commands/updatesources.py +++ b/suricata/update/commands/updatesources.py @@ -73,7 +73,7 @@ def compare_sources(initial_content, final_content): def write_and_compare(initial_content, fileobj): with open(local_index_filename, "wb") as outobj: outobj.write(fileobj.getvalue()) - with open(local_index_filename) as stream: + with open(local_index_filename, "rb") as stream: final_content = yaml.safe_load(stream) compare_sources(initial_content, final_content) logger.info("Saved %s", local_index_filename) -- 2.47.3