From 3f912b5fceaa7b3b209104b18083ba43dfafe67a Mon Sep 17 00:00:00 2001 From: SrikanthMyakam Date: Wed, 29 Jan 2025 09:01:50 +0530 Subject: [PATCH] Update hyperv.py --- lisa/tools/hyperv.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisa/tools/hyperv.py b/lisa/tools/hyperv.py index 9ff7507eeb..a9dd7f7a5f 100644 --- a/lisa/tools/hyperv.py +++ b/lisa/tools/hyperv.py @@ -82,6 +82,8 @@ def get_vm_disks(self, name: str) -> List[VMDisk]: force_run=True, output_json=True, ) + if not output: + return [] # above command returns a list of disks if there are multiple disks. # if there is only one disk, it returns a single disk but not a list. # so convert the output to a list if it is not already a list