summaryrefslogtreecommitdiffstats
path: root/robotframework-onap
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-08-22 17:52:53 -0400
committerDR695H <dr695h@att.com>2019-08-22 17:52:53 -0400
commitb7ca10dbbff71b69683751b2ba5c3da6cd44f80b (patch)
treea2f2d79c8e7bfaf34fba0f31ab34b8ca8b623bb1 /robotframework-onap
parent4ab02dddd76c37467b56f097dd24b7fef134d5e5 (diff)
use unicode encoding for the string
Issue-ID: TEST-184 Change-Id: I41dbeecd8787efaf96b15f5961f00d7eadd3f4ae Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robotframework-onap')
-rw-r--r--robotframework-onap/ONAPLibrary/RequestsHelper.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/robotframework-onap/ONAPLibrary/RequestsHelper.py b/robotframework-onap/ONAPLibrary/RequestsHelper.py
index 7dc5903..f3a0ad5 100644
--- a/robotframework-onap/ONAPLibrary/RequestsHelper.py
+++ b/robotframework-onap/ONAPLibrary/RequestsHelper.py
@@ -90,9 +90,9 @@ class RequestsHelper(object):
@staticmethod
def _format_md5(md5_input):
- if md5_input is not None:
+ if md5_input is not None and isinstance(md5_input, str):
md5 = hashlib.md5()
- md5.update(md5_input)
+ md5.update(md5_input.encode('utf-8'))
return Base64Keywords().base64_encode(md5.hexdigest())
else:
- return None \ No newline at end of file
+ return None