def has_duplicate_keys(config_data, base_conf, raise_error):
    """Compare two dictionaries for duplicate keys. if raise_error is True
    then raise on exception, otherwise log return True."""
    duplicate_keys = set(base_conf) & set(config_data)
    if not duplicate_keys:
        return
    msg = "Duplicate keys in config: %s" % duplicate_keys
    if raise_error:
        raise errors.ConfigurationError(msg)
    log.info(msg)
    return True
def has_duplicate_keys ( config_data , base_conf , raise_error ) : duplicate_keys = set ( base_conf ) & set ( config_data ) if not duplicate_keys : return msg = "Duplicate keys in config: %s" % duplicate_keys if raise_error : raise errors . ConfigurationError ( msg ) log . info ( msg ) return True
Compare two dictionaries for duplicate keys. if raise_error is True
    then raise on exception, otherwise log return True.