confighelper: fix the get_hash() method

Include the option's values in the hash.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-02-13 20:48:27 -05:00
parent 9be93ff445
commit ee11ed2a15
1 changed files with 2 additions and 1 deletions

View File

@ -80,8 +80,9 @@ class ConfigHelper:
def get_hash(self) -> hashlib._Hash: def get_hash(self) -> hashlib._Hash:
hash = hashlib.sha256() hash = hashlib.sha256()
for option in self.config[self.section]: for option, val in self.config[self.section].items():
hash.update(option.encode()) hash.update(option.encode())
hash.update(val.encode())
return hash return hash
def get_prefix_sections(self, prefix: str) -> List[str]: def get_prefix_sections(self, prefix: str) -> List[str]: