mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-13 20:31:09 +00:00
Avoid an error on empty lines.
This commit is contained in:
parent
ad01f416b9
commit
ff0347123d
@ -316,7 +316,7 @@ if __name__ == '__main__':
|
||||
else:
|
||||
lines = after.split('\n')
|
||||
for (i, line) in enumerate(lines):
|
||||
if line[0] != '#':
|
||||
if line and line[0] != '#':
|
||||
lines[i] = lines[i].replace(old, new)
|
||||
after = '\n'.join(lines)
|
||||
if after != before:
|
||||
|
Loading…
x
Reference in New Issue
Block a user