wmllint-1.4: simplify a line modification
This commit is contained in:
parent
2877a6a489
commit
f4f11c03fc
1 changed files with 1 additions and 4 deletions
|
@ -1659,10 +1659,7 @@ def is_map(filename):
|
|||
lines = fp.readlines()
|
||||
has_map_content = False
|
||||
for i, line in enumerate(lines):
|
||||
if line.endswith("\n"):
|
||||
lines[i] = line[:-1]
|
||||
if line.endswith("\r"):
|
||||
lines[i] = line[:-1]
|
||||
lines[i] = line.rstrip("\n\r")
|
||||
w = len(lines[0])
|
||||
for line in lines:
|
||||
if len(line) != w:
|
||||
|
|
Loading…
Add table
Reference in a new issue