changed variable name away from type (type is a built in function!). Also catching AttributeError and coded a case for when primary_nics is [].
changed variable name away from type (type is a built in function!). Also catching AttributeError and coded a case for when primary_nics is [].

rtucker-mozilla/mozilla_inventory,rtucker-mozilla/mozilla_inventory,rtucker-mozilla/mozilla_inventory,mozilla/inventory,mozilla/inventory,rtucker-mozilla/inventory,mozilla/inventory,mozilla/inventory,rtucker-mozilla/mozilla_inventory,rtucker-mozilla/inventory,rtucker-mozilla/inventory,rtucker-mozilla/inventory,mozilla/inventory,rtucker-mozilla/mozilla_inventory,rtucker-mozilla/inventory