diff options
author | Eric Harney <eharney@redhat.com> | 2019-09-03 17:41:28 -0400 |
---|---|---|
committer | Eric Harney <eharney@redhat.com> | 2019-09-03 17:41:28 -0400 |
commit | 433659932b7c45966ddb63ee26911c6a5c7f4725 (patch) | |
tree | d348af79ddffb41dbd00959adb7b9866915422f1 /taskflow/engines | |
parent | f0eae2cc7c1222ee1bbc1a0018337fb2a2289de2 (diff) | |
download | taskflow-433659932b7c45966ddb63ee26911c6a5c7f4725.tar.gz |
Fix python3.8 hmac compatibility
The "digestmod" parameter must be passed in for Python 3.8.
md5 was chosen here because this is what was implicitly used
for Python < 3.8.
Change-Id: I17eca0692c4a89ff90cfa9d4ef3947d2c9ee23e7
Diffstat (limited to 'taskflow/engines')
-rw-r--r-- | taskflow/engines/action_engine/process_executor.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/taskflow/engines/action_engine/process_executor.py b/taskflow/engines/action_engine/process_executor.py index 8699ed5..4115653 100644 --- a/taskflow/engines/action_engine/process_executor.py +++ b/taskflow/engines/action_engine/process_executor.py @@ -19,6 +19,7 @@ import binascii import collections import errno import functools +import hashlib import hmac import math import os @@ -265,7 +266,7 @@ def _create_random_string(desired_length): def _calculate_hmac(auth_key, body): - mac = hmac.new(auth_key, body).hexdigest() + mac = hmac.new(auth_key, body, hashlib.md5).hexdigest() if isinstance(mac, six.text_type): mac = mac.encode("ascii") return mac |