Skip to content

Commit

Permalink
fix "embedded null character" exception while reading checksum (#1037)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonsoroko authored May 10, 2024
1 parent a507183 commit 1a2ff12
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/site-packages/elementum/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def get_elementumd_checksum(path):
with open(path) as fp:
fp.seek(0, os.SEEK_END)
fp.seek(fp.tell() - 40, os.SEEK_SET)
return fp.read().strip()
checksum = fp.read().strip()
return checksum
except Exception as e:
log.info("exception reading checksum path %s: %s" % (path, e))
return ""
Expand Down

0 comments on commit 1a2ff12

Please sign in to comment.