From 902f0e4650d800baf2ca8a755e5a64050828bcda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Tue, 17 Nov 2020 16:54:28 +0100 Subject: [PATCH] splitSources.py: Read file in binary mode to avoid UnicodeDecodeErrors while splitting --- scripts/splitSources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/splitSources.py b/scripts/splitSources.py index c055d683d..34b2e0c93 100755 --- a/scripts/splitSources.py +++ b/scripts/splitSources.py @@ -61,7 +61,7 @@ if __name__ == '__main__': try: # decide if file has multiple sources - with open(filePath, mode='r', encoding='utf8', newline='') as f: + with open(filePath, mode='rb', encoding='utf8', newline='') as f: lines = f.read().splitlines() if len(lines) >= 1 and lines[0][:12] == "==== Source:": hasMultipleSources = True