U
    |®Þh±  ã                   @   s$   d dl Z d dlmZ dZdd„ ZdS )é    N)ÚUnsupportedOperationi   c              	   C   s˜   d}t | dƒr|  ¡ }z|  d¡ W n ttfk
r<   Y nX t tdƒrXt | tj¡}n$t ¡ }|  t	¡}|spq|| 
|¡ q`t | dƒr|  |¡ | ¡ S )zU
    Compute the hash of a file-like object, without loading it all into memory.
    r   ÚtellÚfile_digestÚseek)Úhasattrr   r   ÚAttributeErrorr   Úhashlibr   Úsha1ÚreadÚHASH_READ_SIZEÚupdateÚ	hexdigest)ZfilelikeZfile_posZhasherÚdata© r   úZ/var/www/dating/data/www/fatepal.com/env/lib/python3.8/site-packages/wagtail/utils/file.pyÚhash_filelike   s"    




r   )r   Úior   r   r   r   r   r   r   Ú<module>   s   