Skip to content

Commit

Permalink
small comment change
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Oct 3, 2016
1 parent c78d206 commit 72aec2a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/admin_scripts/base/trailing_spaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,11 @@ def remove_trailing_newlines(file_path, windows_newline = True):
# writes the valid file line stripped to the string buffer
string_buffer.write(valid_file_line_stripped)

# in case the newline mode is of type windows
if windows_newline:
# writes the carriage return character and the new line character
string_buffer.write(b"\r\n")
else:
# writes the new line character
string_buffer.write(b"\n")
# in case the newline mode is of type windows, writes the
# carriage return character and the new line character,
# otherwise, writes only the new line character
if windows_newline: string_buffer.write(b"\r\n")
else: string_buffer.write(b"\n")
finally:
# closes the file for reading
file.close()
Expand Down

0 comments on commit 72aec2a

Please sign in to comment.