def CMDadd(parser):
  (options, args) = parser.parse_args()
  db = open_db(options)
  if len(args) == 0:
    parser.error('Expected at least one directory')
  ok = True
  for d in args:
    try:
      db.add_dir(d)
    except DBException, ex:
      ok = False
      print ex.args[0]
  if not ok:
    return 255
  return 0
Adds a directory to the index
dataset/ETHPy150Open natduca/quickopen/src/quickopen.py/CMDadd