summaryrefslogtreecommitdiffstats
path: root/scripts/remove-vfcmts/filter-vfcmts.py
blob: 54c77e3e19ab685b7838c8d050be7b278efb7fc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!python -u

import sys
import json


def is_vfcmt(str_json):
  data = json.loads(str_json)
  try:
    resource_type = data["properties"]["resourceType"]
    value = resource_type[0]["value"]
    return value == "VFCMT"
  except:
    return False


for line in sys.stdin:
  if is_vfcmt(line):
    print line,