def read_json_or_die(path):
    try:
        with open(path, 'rb') as f:
            string = f.read()
        return json.loads(string)
    except __HOLE__ as e:
        print "Invalid JSON in %s:\n%s" % (path, string)
        print e
        sys.exit(1)
dataset/ETHPy150Open codalab/codalab-cli/codalab/lib/codalab_manager.py/read_json_or_die