U
    Z+d                  
   @   st   d Z ddlZddlmZmZmZ ejededejddedd	d
ejdeddddej	edd Z
dS )z<The ``celery result`` program, used to inspect task results.    N)CeleryCommandCeleryOptionhandle_preload_options)clstask_idz-tz--taskzResult Optionsz!Name of task (if custom backend).)r   
help_grouphelpz--tracebackTzShow traceback instead.)r   Zis_flagr   r   c                 C   sH   | j j}|r|j| jn|j}||}|r0|jn| }| j | dS )z+Print the return value for a given task id.N)objappZtasksZAsyncResult	tracebackgetZecho)ctxr   Ztaskr   r
   Z
result_clsZtask_resultvalue r   5/tmp/pip-unpacked-wheel-ucduq0nd/celery/bin/result.pyresult   s
    r   )__doc__ZclickZcelery.bin.baser   r   r   commandargumentoptionZpass_contextr   r   r   r   r   <module>   s&   
