Avoid an error on empty lines.
This commit is contained in:
parent
ad01f416b9
commit
ff0347123d
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue