3
d                 @   s4   d Z dZdZdddgZG dd deZd	ddZdS )
zTrung Dong Huynhztrungdong@donggiang.comz2.0.0Errormodelreadc               @   s   e Zd ZdZdS )r   z*Base class for all errors in this package.N)__name__
__module____qualname____doc__ r   r   -/tmp/pip-build-7vycvbft/prov/prov/__init__.pyr      s   Nc             C   sv   ddl m} ddlm} |j  |jj }|r@|j| |j dS x0|D ] }y|j| |dS    Y qFX qFW t	ddS )a  
    Convenience function returning a ProvDocument instance.

    It does a lazy format detection by simply using try/except for all known
    formats. The deserializers should fail fairly early when data of the
    wrong type is passed to them thus the try/except is likely cheap. One
    could of course also do some more advanced format auto-detection but I am
    not sure that is necessary.

    The downside is that no proper error messages will be produced, use the
    format parameter to get the actual traceback.
        )ProvDocument)Registry)sourceformatznCould not read from the source. To get a proper error message, specify the format with the 'format' parameter.N)
Z
prov.modelr   Zprov.serializersr   Zload_serializersserializerskeysZdeserializelower	TypeError)r   r   r   r   r   r   r   r	   r      s    


)N)
__author__	__email____version____all__	Exceptionr   r   r   r   r   r	   <module>   s
   
