mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use system encoding
This commit is contained in:
parent
1af21bbe5e
commit
1e7211838d
1 changed files with 1 additions and 1 deletions
|
@ -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('utf-8')).hexdigest()
|
||||
payload_hash = hashlib.sha256(data.encode(sys.getdefaultencoding())).hexdigest()
|
||||
|
||||
# Combine elements to create create canonical request
|
||||
canonical_request = '\n'.join((
|
||||
|
|
Loading…
Add table
Reference in a new issue