def find_vdirs():
    print("If you use vdirsyncer to sync with CalDAV servers, we can try to "
          "load its config file and add your calendars to khal's config.")
    if not confirm("Should we try to load vdirsyncer's config?", default='y'):
        return None
    try:
        from vdirsyncer.cli import config
    except __HOLE__:
        print("Sorry, cannot import vdirsyncer. Please make sure you have it "
              "installed.")
        return None
    vdir_config = config.load_config()
    vdirs = list()
    for storage in vdir_config.storages.values():
        if storage['type'] == 'filesystem':
            # TODO detect type of storage properly
            vdirs.append((storage['instance_name'], storage['path'], 'collection'))
    if vdirs == list():
        print("No usable collections were found")
        return None
    else:
        print("The following collections were found:")
        for name, path, _ in vdirs:
            print('  {}: {}'.format(name, path))
        return vdirs
dataset/ETHPy150Open pimutils/khal/khal/configwizard.py/find_vdirs