diff --git a/alxcheck/checks/general.py b/alxcheck/checks/general.py index 78d4fca..6416444 100644 --- a/alxcheck/checks/general.py +++ b/alxcheck/checks/general.py @@ -19,5 +19,5 @@ def check_file_ends_with_new_line(file_path): if not check_file_not_empty(file_path): return False - with open(file_path, "rb") as f: - return f.readlines()[-1] == b"\n" + with open(file_path, "r") as f: + return f.readlines()[-1][-1] == "\n"