Skip to content

Commit

Permalink
Manage empty line reading
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasGrosjean committed Oct 21, 2023
1 parent 021961a commit 00a5295
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/read_localization_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ def file_to_keys_and_values(absolute_file_path):
"""
with open(absolute_file_path, "r", encoding="utf8") as f:
lines = f.readlines()
if len(lines) == 0:
return dict(), ""
res = dict()
for i in range(len(lines)):
try:
Expand Down

0 comments on commit 00a5295

Please sign in to comment.