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