[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
1b2980540d
commit
ffcef27eb1
@ -255,7 +255,7 @@ def parse_png(png, hname, dpg_ecmp_content = None):
|
||||
if name == hname:
|
||||
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
|
||||
|
||||
if child.tag == str(QName(ns, "DeviceInterfaceLinks")):
|
||||
|
Loading…
Reference in New Issue
Block a user