i += 1
collections_to_delete = arvados.util.list_all(arv.collections().list, filters=[["portable_data_hash", "=", b]])
for d in collections_to_delete:
t = ""
if d["properties"].get("type") not in ("output", "log"):
t = "\"type\" was '%s', expected one of 'output' or 'log'" % d["properties"].get("type")
i += 1
collections_to_delete = arvados.util.list_all(arv.collections().list, filters=[["portable_data_hash", "=", b]])
for d in collections_to_delete:
t = ""
if d["properties"].get("type") not in ("output", "log"):
t = "\"type\" was '%s', expected one of 'output' or 'log'" % d["properties"].get("type")