Apparently __salt_system_encoding__ is a thing

This commit is contained in:
Joseph Hall 2017-10-13 09:54:26 -06:00
parent 1e7211838d
commit 0e8b325667
No known key found for this signature in database
GPG key ID: AE3016C3D03111C4

View file

@ -260,7 +260,7 @@ def sig4(method, endpoint, params, prov_dict,
# Create payload hash (hash of the request body content). For GET
# requests, the payload is an empty string ('').
if not payload_hash:
payload_hash = hashlib.sha256(data.encode(sys.getdefaultencoding())).hexdigest()
payload_hash = hashlib.sha256(data.encode(__salt_system_encoding__)).hexdigest()
# Combine elements to create create canonical request
canonical_request = '\n'.join((