missed hash_update
This commit is contained in:
1 parent
819d690bc3
commit
6f987577f4
1 file changed
+7
-5
@@ -191,14 +191,16 @@ class AnnouncementPlugin(octoprint.plugin.AssetPlugin,
|
||||
def etag():
|
||||
import hashlib
|
||||
hash = hashlib.sha1()
|
||||
hash.update(repr(sorted(enabled)))
|
||||
hash.update(repr(sorted(forced)))
|
||||
hash.update(OCTOPRINT_VERSION)
|
||||
def hash_update(value):
|
||||
hash.update(value.encode("utf-8"))
|
||||
hash_update(repr(sorted(enabled)))
|
||||
hash_update(repr(sorted(forced)))
|
||||
hash_update(OCTOPRINT_VERSION)
|
||||
|
||||
for channel in sorted(channel_configs.keys()):
|
||||
hash.update(repr(channel_configs[channel]))
|
||||
hash_update(repr(channel_configs[channel]))
|
||||
channel_data = self._get_channel_data_from_cache(channel, channel_configs[channel])
|
||||
hash.update(repr(channel_data))
|
||||
hash_update(repr(channel_data))
|
||||
|
||||
return hash.hexdigest()
|
||||
|
||||
|
||||
Reference in new issue
Block a user