Your IP : 216.73.216.172


Current Path : /lib/python3/dist-packages/certbot/display/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/certbot/display/__pycache__/enhancements.cpython-38.pyc

U

�]�@sfdZddlZddlZddlmZddlmZddlmZ	e�
e�Zej
jZdd�Zdd	�Zd
eiZdS)zCertbot Enhancement Display�N)�errors)�
interfaces)�utilcCs<zt|�WStk
r6t�d|�t�d��YnXdS)a!Display the enhancement to the user.

    :param str enhancement: One of the
        :class:`certbot.CONFIG.ENHANCEMENTS` enhancements

    :returns: True if feature is desired, False otherwise
    :rtype: bool

    :raises .errors.Error: if the enhancement provided is not supported

    z*Unsupported enhancement given to ask(): %szUnsupported EnhancementN)�DISPATCH�KeyError�logger�errorr�Error)Zenhancement�r
�>/usr/lib/python3/dist-packages/certbot/display/enhancements.py�asks
rcCs<ddg}ttj�jd|dddd�\}}|tjkr4dS|d	kS)
z�Determines whether the user would like to redirect to HTTPS.

    :returns: True if redirect is desired, False otherwise
    :rtype: bool

    )zNo redirectz7Make no further changes to the webserver configuration.)ZRedirectz�Make all requests redirect to secure HTTPS access. Choose this for new sites, or if you're confident your site works on HTTPS. You can undo this change by editing your web server's configuration.zUPlease choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.rz--redirect / --no-redirectT)�defaultZcli_flagZforce_interactiveF�)rrZIDisplayZmenu�display_utilZOK)�choices�codeZ	selectionr
r
r�redirect_by_default%s�
�

rZredirect)�__doc__ZloggingZzope.component�zopeZcertbotrrZcertbot.displayrrZ	getLogger�__name__rZ	componentZ
getUtilityrrrr
r
r
r�<module>s
�