U
    >i                     @   s*   d dl mZ d dlmZ G dd dZdS )    )ValidationError)contextc                   @   s   e Zd ZdddZdd ZdS )BaseAdapterNc                 C   s   t j| _d S )N)r   request)selfr    r   A/tmp/pip-unpacked-wheel-upujnpc2/allauth/core/internal/adapter.py__init__   s    zBaseAdapter.__init__c                 G   s&   | j | }|r|| }t||d}|S )N)code)Zerror_messagesr   )r   r
   argsmessageexcr   r   r   validation_error   s
    
zBaseAdapter.validation_error)N)__name__
__module____qualname__r	   r   r   r   r   r   r      s   
r   N)Zdjango.core.exceptionsr   Zallauth.corer   r   r   r   r   r   <module>   s   