Skip to content

Commit 7f3957c

Browse files
authored
Fix ssdhealth failure on VS platform (#3743)
Fix ssdhealth failure on VS platform
1 parent 97b4e4b commit 7f3957c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

show/platform.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ def ssdhealth(device, verbose, vendor):
114114
# }
115115
# }
116116
# }
117-
device = platform_data.get("chassis", {}).get("disk", {}).get("device", None)
117+
if platform_data:
118+
device = platform_data.get("chassis", {}).get("disk", {}).get("device", None)
119+
118120
if not device:
119121
# Fallback to discovery
120122
device = os.popen("lsblk -o NAME,TYPE -p | grep disk").readline().strip().split()[0]

0 commit comments

Comments
 (0)