a
    ì¢ƒ[¥  ã                   @   sF   d dl mZmZmZ d dlmZ [[[d
dd„Zddd„Zdd	„ ZdS )é    )Úabsolute_importÚprint_functionÚunicode_literals)ÚgetpassNc                 C   s6   d}|durd| }|r |d7 }t d| |f ƒ tƒ S )z£This is a sample callback that will read a passphrase from
    the terminal.  The hook here, if present, will be used to describe
    why the passphrase is needed.Ú Nú z (again)zPlease supply %s' password%s:)Úprintr   )ÚhintZdescZprev_badÚhookZwhy© r   ú//usr/lib/python3/dist-packages/gpg/callbacks.pyÚpassphrase_stdin   s    r   c                 C   s   t d| |||f ƒ d S )Nz?PROGRESS UPDATE: what = %s, type = %d, current = %d, total = %d)r   )ZwhatÚtypeZcurrentÚtotalr
   r   r   r   Úprogress_stdout&   s    
ÿr   c                 C   s0   | r|  | ¡S t|dƒsdS | dd¡ dS dS )z?A callback for data.  hook should be a Python file-like object.ÚseekNr   )ÚreadÚhasattrr   )Úcountr
   r   r   r   Ú	readcb_fh+   s    

r   )N)N)Z
__future__r   r   r   r   r   r   r   r   r   r   r   Ú<module>   s
   

