MOON
Server: Apache
System: Linux server2.shieldcogroup.com 3.10.0-1160.119.1.el7.tuxcare.els12.x86_64 #1 SMP Fri Nov 8 05:49:38 UTC 2024 x86_64
User: jacom (1029)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python2.7/site-packages/leapp/dialogs/dialog.pyc
�
g��fc@sdefd��YZdS(tDialogcBs�eZdZd	Zd
Zd
Zd
Zd
d
d
d�Zd�Z	e
d��Ze
d��Zd�Z
d�Zd�Zd�ZRS(s�
    The dialog class is used to declare the information passed to the user and retrieved from the user
    during an interaction.
    cCsj|p|j|_|r0|jdd�j�n||_||_||_||_d|_d|_	dS(sl

        :param scope: Unique scope identifier for the data to be stored in the answer files. Scope + component key
                      is used to address values.
        :type scope: str
        :param reason: An explanation for what the data in this dialog is needed for.
        :type reason: str
        :param title: Title of the dialog
        :type title: str
        :param components: Components to display in the given order in the dialog
        :type components: tuple(leapp.dialogs.components.Component)
        :param key: Key to appear in the dialog-related report entry
        :type key: str
        s
t N(
t
componentstreplacetstripttitletscopetreasontkeytNonet_storet_min_label_width(tselfRRRRR((s8/usr/lib/python2.7/site-packages/leapp/dialogs/dialog.pyt__init__s'				cCsEig|jD]}|j�^q
d6|jd6|jd6|jd6S(sW
        :return: Dictionary with the serialized representation of a component
        RRRR(Rt	serializeRRR(Rt	component((s8/usr/lib/python2.7/site-packages/leapp/dialogs/dialog.pyR,s
#

cs�fd��jD�S(Ncs7i|]-}t|dg�dj�j|j��qS(tchoicess{}.{}(tgetattrtformatRR(t.0tc(R(s8/usr/lib/python2.7/site-packages/leapp/dialogs/dialog.pys
<dictcomp>9s	(R(R((Rs8/usr/lib/python2.7/site-packages/leapp/dialogs/dialog.pytanswerfile_sections7scCs/|js(td�|jD��|_n|jS(s�
        :return: Returns the highest number of characters all labels in the dialog have, to help calculating the minimum
                 width the labels should have.
        css'|]}|jrt|j�VqdS(N(tlabeltlen(Rtcomp((s8/usr/lib/python2.7/site-packages/leapp/dialogs/dialog.pys	<genexpr>Bs(RtmaxR(R((s8/usr/lib/python2.7/site-packages/leapp/dialogs/dialog.pytmin_label_width;s	cCs)||_|jj|j|j|�dS(s�
        Implements storing of answers.

        :param component: Component for which the answer is set
        :param value: The answer value
        :return: None
        N(tvalueR
tanswerRR(RRR((s8/usr/lib/python2.7/site-packages/leapp/dialogs/dialog.pyREs	cCs+x$|jD]}|j|kr
|Sq
WdS(s�
        Finds the component with the given key

        :param key: Key of the component to return
        :type key: str
        :return: Component found or None
        N(RRR	(RRR((s8/usr/lib/python2.7/site-packages/leapp/dialogs/dialog.pytcomponent_by_keyPscCs |j|�|j|ji�S(s�
        Checks answerstore if an answer is recorded for the dialog.

        :param store: AnswerStore instance
        :return: Dictionary with answers once retrieved
        (t	translatetgetR(Rtstore((s8/usr/lib/python2.7/site-packages/leapp/dialogs/dialog.pytget_answers]s
cCs[|j|�td�|jD��rH||_|j|�d|_n|j|ji�S(s!
        Same as get_answers but with interactive retrieval of the answer
        in case no recorded answer found in answerstore.

        :param store: AnswerStore instance
        :param renderer: Target renderer instance
        :return: Dictionary with answers once retrieved
        css|]}|jdkVqdS(N(RR	(RR((s8/usr/lib/python2.7/site-packages/leapp/dialogs/dialog.pys	<genexpr>qsN(RtanyRR
trenderR	RR(RR trenderer((s8/usr/lib/python2.7/site-packages/leapp/dialogs/dialog.pytrequest_answersgs	
	
(N(t__name__t
__module__t__doc__RR	RRRR
RtpropertyRRRRR!R%(((s8/usr/lib/python2.7/site-packages/leapp/dialogs/dialog.pyRs	
		
	
N(tobjectR(((s8/usr/lib/python2.7/site-packages/leapp/dialogs/dialog.pyt<module>s