Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
avoid issue with different line endings under Windows
see https://docs.python.org/3.10/library/functions.html#open-newline-parameter
  • Loading branch information
JostMigenda committed Jul 26, 2021
1 parent f638ee9 commit a47a83a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sntools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def setup():

tryprint(u"\U0001f6e0")
print("Checking output file ...")
with open('outfile.kin', 'rb') as f:
output_sha = hashlib.sha256(f.read()).hexdigest()
with open('outfile.kin', 'r') as f:
output_sha = hashlib.sha256(f.read().encode('utf-8')).hexdigest()

test_sha = "4424b738d32b6c4baa459fb6fb76d63f944b572a02d319bde4fd247a520f1e29"
if output_sha == test_sha:
Expand Down

0 comments on commit a47a83a

Please sign in to comment.