[minigraph.py]: Check for empty cluster tag before parsing (#6440)

Some non-production minigraphs will have an empty ClusterName tag

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
This commit is contained in:
Lawrence Lee 2021-01-15 08:03:47 -08:00 committed by Abhishek Dosi
parent 8606d78688
commit e9cab58c2d

View File

@ -152,7 +152,7 @@ def parse_png(png, hname):
if name == hname: if name == hname:
cluster = device.find(str(QName(ns, "ClusterName"))) cluster = device.find(str(QName(ns, "ClusterName")))
if cluster != None and "str" in cluster.text.lower(): if cluster != None and cluster.text != None and "str" in cluster.text.lower():
is_storage_device = True is_storage_device = True
if child.tag == str(QName(ns, "DeviceInterfaceLinks")): if child.tag == str(QName(ns, "DeviceInterfaceLinks")):