mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
splitSources.py: Support the case where the input file is empty
This commit is contained in:
parent
a67828b9ba
commit
970381cb1d
@ -65,7 +65,7 @@ if __name__ == '__main__':
|
|||||||
# decide if file has multiple sources
|
# decide if file has multiple sources
|
||||||
with open(filePath, mode='r', encoding='utf8', newline='') as f:
|
with open(filePath, mode='r', encoding='utf8', newline='') as f:
|
||||||
lines = f.read().splitlines()
|
lines = f.read().splitlines()
|
||||||
if lines[0][:12] == "==== Source:":
|
if len(lines) >= 1 and lines[0][:12] == "==== Source:":
|
||||||
hasMultipleSources = True
|
hasMultipleSources = True
|
||||||
writeSourceToFile(lines)
|
writeSourceToFile(lines)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user