mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-22 14:13:45 +00:00
@@ -125,7 +125,9 @@ def check_raw(path, max_length):
|
|||||||
ok = True
|
ok = True
|
||||||
with open(path, 'r') as f:
|
with open(path, 'r') as f:
|
||||||
text = f.read()
|
text = f.read()
|
||||||
if text[-1] == os.linesep:
|
if not text:
|
||||||
|
ok = error(path, "empty")
|
||||||
|
elif text[-1] == os.linesep:
|
||||||
text = text[:-1]
|
text = text[:-1]
|
||||||
else:
|
else:
|
||||||
ok = error(path, "missing new line")
|
ok = error(path, "missing new line")
|
||||||
|
|||||||
Reference in New Issue
Block a user