correctly decode output from list-ids.sh

This commit is contained in:
forest 2020-05-21 22:45:00 -05:00
parent f74a361c5f
commit 5a080fe1c5

View File

@ -106,7 +106,7 @@ class ShellScriptVirtualization(VirtualizationInterface):
def list_ids(self) -> list: def list_ids(self) -> list:
completedProcess = run([join(current_app.root_path, 'shell_scripts/list-ids.sh')], capture_output=True) completedProcess = run([join(current_app.root_path, 'shell_scripts/list-ids.sh')], capture_output=True)
self.validate_completed_process(completedProcess) self.validate_completed_process(completedProcess)
return completedProcess.stdout.splitlines() return list(map(lambda x: x.decode("utf-8"), completedProcess.stdout.splitlines() ))
def create(self, email: str, id: str, template_image_file_name: str, vcpus: int, memory_mb: int, ssh_public_keys: list): def create(self, email: str, id: str, template_image_file_name: str, vcpus: int, memory_mb: int, ssh_public_keys: list):
validate_capsul_id(id) validate_capsul_id(id)