예제 #1
0
def GetWMIData():
  if WMI_SW:
    return WMI_SW

  # Load some wmi data
  parser = wmi_parser.WMIInstalledSoftwareParser()
  test_data = os.path.join(CHECKS_DIR, "data/wmi_sw.yaml")
  with open(test_data, "rb") as f:
    wmi = yaml.safe_load(f)
    for sw in wmi:
      WMI_SW.extend(parser.Parse(sw))
예제 #2
0
def GetWMIData():
    if WMI_SW:
        return WMI_SW

    # Load some wmi data
    parser = wmi_parser.WMIInstalledSoftwareParser()
    test_data = os.path.join(CHECKS_DIR, "data/wmi_sw.yaml")
    wmi = yaml.ReadFromPath(test_data)
    WMI_SW.extend(parser.ParseMultiple(wmi))

    return WMI_SW