def read(path, filename='.config'):
    try:
        if os.path.isdir(path):
            path = os.path.join(path, '.config')
        with open(path) as config_file:
            content = config_file.read()
        configuration = yaml.load(content)
    except __HOLE__:
        logging.debug(u'config file "{}" not found'.format(path))
        return {}
    except yaml.scanner.ScannerError as e:
        logging.error(u'Malformed user configuration file: {}'.format(e))
        return {}
    return configuration
dataset/ETHPy150Open marcwebbie/passpie/passpie/config.py/read