[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:
parent
8606d78688
commit
e9cab58c2d
@ -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")):
|
||||||
|
Reference in New Issue
Block a user