mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
splitSources.py: Read file in binary mode to avoid UnicodeDecodeErrors while splitting
This commit is contained in:
parent
b6ba8fd067
commit
902f0e4650
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user