Spade

Mini Shell

Directory:~$ /usr/lib/python2.7/site-packages/certbot/_internal/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ //usr/lib/python2.7/site-packages/certbot/_internal/reporter.pyo

�
���_c@s�dZddlmZddlZddlZddlZddlZddlmZddl	Z
ddlmZddlm
Z
eje�Ze
jjej�defd��Y�ZdS(	s.Collects and displays information
to the user.i����(tprint_functionN(tqueue(t
interfaces(tutiltReportercBsPeZdZdZdZdZejdd�Zd�Z	e
d�Zd�ZRS(	s�Collects and displays information to the user.

    :ivar `queue.PriorityQueue` messages: Messages to be displayed to
        the user.

    iiitReporterMsgspriority text
on_crashcCstj�|_||_dS(N(Rt
PriorityQueuetmessagestconfig(tselfR((s>/usr/lib/python2.7/site-packages/certbot/_internal/reporter.pyt__init__$scCs3|jj|j|||��tjd|�dS(sXAdds
msg to the list of messages to be printed.

        :param str msg: Message to be displayed to the user.

        :param int priority: One of `HIGH_PRIORITY`, `MEDIUM_PRIORITY`,
            or `LOW_PRIORITY`.

        :param bool on_crash: Whether or not the message should be
            printed if the program exits abnormally.

        sReporting to user:
%sN(Rtputt	_msg_typetloggertdebug(R	tmsgtpriorityton_crash((s>/usr/lib/python2.7/site-packages/certbot/_internal/reporter.pytadd_message(s
c	s�t}|jj�s�tj�dd
k}tjj�}|jj	si|r\t
tj�nt
d�nt
jdddddtd	t�}t
jd|jd|jdtd	t��nx	|jj�s�|jj�}|jj	r|j|jko�|jsq�qn|s|jr�|r]|j|jkr]|jj	s]tjjtj�t}q]n|jj�}t
|j|d��t|�d
kr�t
dj�fd�|d
D���q�q�q�W|r�|jj	r�tjjtj�nd
S(s�Prints
messages to the user and clears the message queue.

        If there is an unhandled exception, only messages for which
        ``on_crash`` is ``True`` are printed.

        isIMPORTANT NOTES:tinitial_indents - tsubsequent_indentt
itbreak_long_wordstbreak_on_hyphensis
c3s|]}�j|�VqdS(N(tfill(t.0tline(tnext_wrapper(s>/usr/lib/python2.7/site-packages/certbot/_internal/reporter.pys	<genexpr>asNs
 
(tFalseRtemptytsystexc_infotNonetstdouttisattyRtquiettprintRt
ANSI_SGR_BOLDttextwraptTextWrapperRtgetRt
HIGH_PRIORITYRtwritetANSI_SGR_RESETttextt
splitlinesRtlentjoin(R	tbold_ontno_exceptiont
first_wrapperRtlines((Rs>/usr/lib/python2.7/site-packages/certbot/_internal/reporter.pytprint_messages8sF
							((
t__name__t
__module__t__doc__R)tMEDIUM_PRIORITYtLOW_PRIORITYtcollectionst
namedtupleRR
tTrueRR4(((s>/usr/lib/python2.7/site-packages/certbot/_internal/reporter.pyRs	(R7t
__future__RR:tloggingRR&t	six.movesRtzope.interfacetzopetcertbotRRt	getLoggerR5R
t	interfacetimplementert	IReportertobjectR(((s>/usr/lib/python2.7/site-packages/certbot/_internal/reporter.pyt<module>s