2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-22 01:49:48 +00:00

[#3600] check if message file is empty

This commit is contained in:
Marcin Godzina 2024-09-22 18:35:59 +00:00
parent 154174e45a
commit 66939a6844

View File

@ -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.