How to make getInterestingComponents() ignore virtual parts so they don't show up in the BOM?

How to make the function “getInterestingComponents()” of class “netlist()” in the BOM plugin helper file “kicad_netlist_reader.py” exclude the libparts that have the manufacturing attribute set as virtual?

Thinking something like this could work, but need to understand how to pull out the value of the manufacturing attribute.

    if not exclude:
        # Exclude "virtual" parts (this does not work)
        p = c.getLibPart()
        **mfgatr = p.getField("Attr") # What to put here to get this attribute?**
        if mfgatr == 2:
            exclude = True

How to fix the bolded line above to actually access the correct field?