golden hour
/usr/lib/python2.7/site-packages/certbot/_internal
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.py
184 B
Del
OK
__init__.pyc
349 B
Del
OK
__init__.pyo
349 B
Del
OK
account.py
14.5 KB
Del
OK
account.pyc
14.89 KB
Del
OK
account.pyo
14.89 KB
Del
OK
auth_handler.py
18.38 KB
Del
OK
auth_handler.pyc
17.21 KB
Del
OK
auth_handler.pyo
17.1 KB
Del
OK
cert_manager.py
15.59 KB
Del
OK
cert_manager.pyc
16.42 KB
Del
OK
cert_manager.pyo
16.42 KB
Del
OK
cli
-
Del
OK
client.py
30.2 KB
Del
OK
client.pyc
26.95 KB
Del
OK
client.pyo
26.95 KB
Del
OK
configuration.py
5.75 KB
Del
OK
configuration.pyc
7.77 KB
Del
OK
configuration.pyo
7.77 KB
Del
OK
constants.py
6.37 KB
Del
OK
constants.pyc
5.02 KB
Del
OK
constants.pyo
5.02 KB
Del
OK
display
-
Del
OK
eff.py
4.56 KB
Del
OK
eff.pyc
5.2 KB
Del
OK
eff.pyo
5.2 KB
Del
OK
error_handler.py
7.05 KB
Del
OK
error_handler.pyc
6.59 KB
Del
OK
error_handler.pyo
6.59 KB
Del
OK
hooks.py
7.88 KB
Del
OK
hooks.pyc
9.28 KB
Del
OK
hooks.pyo
9.28 KB
Del
OK
lock.py
9.94 KB
Del
OK
lock.pyc
9.92 KB
Del
OK
lock.pyo
9.92 KB
Del
OK
log.py
13.43 KB
Del
OK
log.pyc
13.56 KB
Del
OK
log.pyo
13.45 KB
Del
OK
main.py
50.33 KB
Del
OK
main.pyc
43.83 KB
Del
OK
main.pyo
43.61 KB
Del
OK
plugins
-
Del
OK
renewal.py
22.29 KB
Del
OK
renewal.pyc
17.4 KB
Del
OK
renewal.pyo
17.4 KB
Del
OK
reporter.py
3.48 KB
Del
OK
reporter.pyc
3.75 KB
Del
OK
reporter.pyo
3.68 KB
Del
OK
snap_config.py
3.38 KB
Del
OK
snap_config.pyc
4.73 KB
Del
OK
snap_config.pyo
4.73 KB
Del
OK
storage.py
45.96 KB
Del
OK
storage.pyc
42.26 KB
Del
OK
storage.pyo
42.26 KB
Del
OK
updater.py
3.87 KB
Del
OK
updater.pyc
4.35 KB
Del
OK
updater.pyo
4.35 KB
Del
OK
Edit: error_handler.pyc
� ���_c @ sZ d Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z e j e � Z e j d k r$e j g Z xW e j e j e j e j g D]. Z e j e � e j k r� e j e � q� q� Wn g Z d e f d � � YZ d e f d � � YZ d S( sB Registers functions to be called if an exception or signal occurs.i����N( t Any( t Callable( t Dict( t List( t Union( t errors( t ost ntt ErrorHandlerc B s_ e Z d Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( sG Context manager for running code that must be cleaned up on failure. The context manager allows you to register functions that will be called when an exception (excluding SystemExit) or signal is encountered. Usage:: handler = ErrorHandler(cleanup1_func, *cleanup1_args, **cleanup1_kwargs) handler.register(cleanup2_func, *cleanup2_args, **cleanup2_kwargs) with handler: do_something() Or for one cleanup function:: with ErrorHandler(func, args, kwargs): do_something() If an exception is raised out of do_something, the cleanup functions will be called in last in first out order. Then the exception is raised. Similarly, if a signal is encountered, the cleanup functions are called followed by the previously received signal handler. Each registered cleanup function is called exactly once. If a registered function raises an exception, it is logged and the next function is called. Signals received while the registered functions are executing are deferred until they finish. c O sS t | _ t | _ g | _ i | _ g | _ | d k rO | j | | | � n d S( N( t Falset call_on_regular_exitt body_executedt funcst prev_handlerst received_signalst Nonet register( t selft funct argst kwargs( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/error_handler.pyt __init__M s c C s t | _ | j � d S( N( R R t _set_signal_handlers( R ( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/error_handler.pyt __enter__V s c C s� t | _ t } | t k r | S| d k r; | j s� | SnS | t j k rf t j d | j � t } n( t j d d j t j | | | � � � | j � | j � | j � | S( Ns Encountered signals: %ss Encountered exception: %st ( t TrueR R t SystemExitR R R t SignalExitt loggert debugR t joint tracebackt format_exceptiont _call_registeredt _reset_signal_handlerst _call_signals( R t exec_typet exec_valuet tracet retval( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/error_handler.pyt __exit__Z s c O s# | j j t j | | | � � d S( s� Sets func to be run with the given arguments during cleanup. :param function func: function to be called in case of an error N( R t appendt functoolst partial( R R R R ( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/error_handler.pyR o s c C s� t j d � xy | j r� y | j d � WnJ t k rw } t j t | � | � } t j d d j | � j � � n X| j j � q Wd S( s Calls all registered functionss Calling registered functionsi����s) Encountered exception during recovery: %sR N( R R R t ExceptionR t format_exception_onlyt typet errorR t rstript pop( R t exct output( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/error_handler.pyR! x s c C sS xL t D]D } t j | � } | d k r | | j | <t j | | j � q q Wd S( s- Sets signal handlers for signals in _SIGNALS.N( t _SIGNALSt signalt getsignalR R t _signal_handler( R t signumt prev_handler( ( sC /usr/lib/python2.7/site-packages/certbot/_internal/error_handler.pyR � s c C s<