fix StateHashFile encoding
All checks were successful
Docker Image CI / test (push) Successful in 44s
Docker Image CI / push (push) Successful in 53s

This commit is contained in:
Dmitry Belyaev 2024-03-03 14:32:12 +03:00
parent 5861836852
commit 5e3805b567
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3

View File

@ -70,5 +70,5 @@ class StateHashFile(GenericTextFile):
state_str = (self.save_ipv4 and addr_v4 or "") + (
self.save_ipv6 and addr_v6 or ""
)
sha = hashlib.sha256(state_str.encode(encoding="utf-8"))
sha = hashlib.sha256(state_str.encode(encoding=self.encoding))
self.content = sha.hexdigest()