Fix string argument without an encoding error

Change-Id: I33991cdbe6ddb104132e09c0e3047f2eb061bb9f
This commit is contained in:
zhurong 2019-08-21 10:08:54 +08:00
parent f73c8877c3
commit 03e3d518bd
1 changed files with 2 additions and 1 deletions

View File

@ -150,7 +150,8 @@ class PlanHandler(handler.Handler):
deploy_keys.append({'source_url': artifact['content']['href'],
'private_key': private_key})
if deploy_keys:
encoded_payload = base64.b64encode(bytes(str(deploy_keys)))
encoded_payload = base64.b64encode(
bytes(str(deploy_keys).encode('utf-8')))
repo_deploy_keys = ''
if sys_param_store == 'database':
repo_deploy_keys = encoded_payload