def CMDrmdir(parser):
  (options, args) = parser.parse_args()
  db = open_db(options)
  dmap = {}
  for d in db.dirs:
    dmap[d.path] = d
  ok = True
  for d in args:
    found = False
    for k in dmap.keys():
      try:
        same = os.path.samefile(d, k)
      except:
        same = False
      if same:
        db.delete_dir(dmap[k])
        print "%s removed" % dmap[k].path
        found = True
        break
    if not found:
      print "%s is not indexed." % d
      ok = False
  if ok:
    return 0
  return 255
Filter out closed indices from `indices`
dataset/ETHPy150Open natduca/quickopen/src/quickopen.py/CMDrmdir--crossover with--dataset/ETHPy150Open elastic/curator/curator/indexlist.py/IndexList.filter_closed