mirror of
https://github.com/docker/compose.git
synced 2025-07-26 07:04:32 +02:00
Remove whitespace from json hash
Reasoning:
e5d8447f06 (commitcomment-11243708)
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
parent
f79eb7b9ad
commit
f5ac1fa073
@ -3,7 +3,7 @@ import hashlib
|
|||||||
|
|
||||||
|
|
||||||
def json_hash(obj):
|
def json_hash(obj):
|
||||||
dump = json.dumps(obj, sort_keys=True)
|
dump = json.dumps(obj, sort_keys=True, separators=(',', ':'))
|
||||||
h = hashlib.sha256()
|
h = hashlib.sha256()
|
||||||
h.update(dump)
|
h.update(dump)
|
||||||
return h.hexdigest()
|
return h.hexdigest()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user