[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 GitHub
parent 1b2980540d
commit ffcef27eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")):