forgot to decode ssh-keyscan.sh output to string

This commit is contained in:
forest 2021-01-30 01:57:52 -06:00
parent 71222e07e6
commit e18d15f7e7

View File

@ -114,7 +114,11 @@ class ShellScriptVirtualization(VirtualizationInterface):
try: try:
completedProcess2 = run([join(current_app.root_path, 'shell_scripts/ssh-keyscan.sh'), ipaddr], capture_output=True) completedProcess2 = run([join(current_app.root_path, 'shell_scripts/ssh-keyscan.sh'), ipaddr], capture_output=True)
self.validate_completed_process(completedProcess2) self.validate_completed_process(completedProcess2)
ssh_host_keys = json.loads(completedProcess2.stdout) current_app.logger.warning(f"""
failed to ssh-keyscan: {completedProcess2.stdout.decode("utf-8")}
"""
)
ssh_host_keys = json.loads(completedProcess2.stdout.decode("utf-8"))
return VirtualMachine(id, ipv4=ipaddr, ssh_host_keys=ssh_host_keys) return VirtualMachine(id, ipv4=ipaddr, ssh_host_keys=ssh_host_keys)
except: except:
current_app.logger.warning(f""" current_app.logger.warning(f"""