Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed May 30, 2022
1 parent 341df2c commit 120dd7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hooks/file_check_lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def file_check_lines(filename, expected_lines, quiet=False):
with open(filename, encoding="utf-8") as f:
lines = f.read().splitlines()

expected_lines = [line.strip("\r\n") for line in expected_lines]
expected_lines = [line.strip("\r\n") for line in expected_lines if line]
if not expected_lines:
sys.stderr.write("Any valid non empty expected line passed as argument\n")
return 1
Expand Down

0 comments on commit 120dd7a

Please sign in to comment.