Skip to content

Commit

Permalink
[#3600] check if message file is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Godzina committed Sep 22, 2024
1 parent 154174e commit 66939a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/reorder_message_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ def process_file(filename):
with open(filename, encoding='utf-8') as f:
lines = f.read().splitlines()

# Do not process the file if it is empty.
if len(lines) == 0:
return

# Search for the first line starting with the percent character. Everything
# before it is considered the file header and is copied to the output with
# leading and trailing spaces removed.
Expand Down

0 comments on commit 66939a6

Please sign in to comment.