/usr/share/doc/python3-certbot/html/api/error_handler.html is in python-certbot-doc 0.23.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | <!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>certbot.error_handler — Certbot 0.23.0 documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="index" title="Index"
href="../genindex.html"/>
<link rel="search" title="Search" href="../search.html"/>
<link rel="top" title="Certbot 0.23.0 documentation" href="../index.html"/>
<link rel="up" title="API Documentation" href="../api.html"/>
<link rel="next" title="certbot.errors" href="errors.html"/>
<link rel="prev" title="certbot.eff" href="eff.html"/>
<script src="../_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="../index.html" class="icon icon-home"> Certbot
</a>
<div class="version">
0.23
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../intro.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../what.html">What is a Certificate?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../install.html">Get Certbot</a></li>
<li class="toctree-l1"><a class="reference internal" href="../using.html">User Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../contributing.html">Developer Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../packaging.html">Packaging Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../resources.html">Resources</a></li>
</ul>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../api.html">API Documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="account.html"><code class="docutils literal"><span class="pre">certbot.account</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="achallenges.html"><code class="docutils literal"><span class="pre">certbot.achallenges</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="auth_handler.html"><code class="docutils literal"><span class="pre">certbot.auth_handler</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="cert_manager.html"><code class="docutils literal"><span class="pre">certbot.cert_manager</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="cli.html"><code class="docutils literal"><span class="pre">certbot.cli</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="client.html"><code class="docutils literal"><span class="pre">certbot.client</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="configuration.html"><code class="docutils literal"><span class="pre">certbot.configuration</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="constants.html"><code class="docutils literal"><span class="pre">certbot.constants</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="crypto_util.html"><code class="docutils literal"><span class="pre">certbot.crypto_util</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="display.html"><code class="docutils literal"><span class="pre">certbot.display</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="eff.html"><code class="docutils literal"><span class="pre">certbot.eff</span></code></a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="docutils literal"><span class="pre">certbot.error_handler</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="errors.html"><code class="docutils literal"><span class="pre">certbot.errors</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="hooks.html"><code class="docutils literal"><span class="pre">certbot.hooks</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="index.html"><code class="docutils literal"><span class="pre">certbot</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="interfaces.html"><code class="docutils literal"><span class="pre">certbot.interfaces</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="lock.html"><code class="docutils literal"><span class="pre">certbot.lock</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="log.html"><code class="docutils literal"><span class="pre">certbot.log</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="main.html"><code class="docutils literal"><span class="pre">certbot.main</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="notify.html"><code class="docutils literal"><span class="pre">certbot.notify</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="ocsp.html"><code class="docutils literal"><span class="pre">certbot.ocsp</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins/common.html"><code class="docutils literal"><span class="pre">certbot.plugins.common</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins/disco.html"><code class="docutils literal"><span class="pre">certbot.plugins.disco</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins/dns_common.html"><code class="docutils literal"><span class="pre">certbot.plugins.dns_common</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins/dns_common_lexicon.html"><code class="docutils literal"><span class="pre">certbot.plugins.dns_common_lexicon</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins/manual.html"><code class="docutils literal"><span class="pre">certbot.plugins.manual</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins/selection.html"><code class="docutils literal"><span class="pre">certbot.plugins.selection</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins/standalone.html"><code class="docutils literal"><span class="pre">certbot.plugins.standalone</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins/util.html"><code class="docutils literal"><span class="pre">certbot.plugins.util</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins/webroot.html"><code class="docutils literal"><span class="pre">certbot.plugins.webroot</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="renewal.html"><code class="docutils literal"><span class="pre">certbot.renewal</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="reporter.html"><code class="docutils literal"><span class="pre">certbot.reporter</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="reverter.html"><code class="docutils literal"><span class="pre">certbot.reverter</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="storage.html"><code class="docutils literal"><span class="pre">certbot.storage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="util.html"><code class="docutils literal"><span class="pre">certbot.util</span></code></a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">Certbot</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html">Docs</a> »</li>
<li><a href="../api.html">API Documentation</a> »</li>
<li><code class="docutils literal"><span class="pre">certbot.error_handler</span></code></li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/api/error_handler.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="module-certbot.error_handler">
<span id="certbot-error-handler"></span><h1><a class="reference internal" href="#module-certbot.error_handler" title="certbot.error_handler"><code class="xref py py-mod docutils literal"><span class="pre">certbot.error_handler</span></code></a><a class="headerlink" href="#module-certbot.error_handler" title="Permalink to this headline">¶</a></h1>
<p>Registers functions to be called if an exception or signal occurs.</p>
<dl class="class">
<dt id="certbot.error_handler.ErrorHandler">
<em class="property">class </em><code class="descclassname">certbot.error_handler.</code><code class="descname">ErrorHandler</code><span class="sig-paren">(</span><em>func=None</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot/error_handler.html#ErrorHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot.error_handler.ErrorHandler" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>Context manager for running code that must be cleaned up on failure.</p>
<p>The context manager allows you to register functions that will be called
when an exception (excluding SystemExit) or signal is encountered.
Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">handler</span> <span class="o">=</span> <span class="n">ErrorHandler</span><span class="p">(</span><span class="n">cleanup1_func</span><span class="p">,</span> <span class="o">*</span><span class="n">cleanup1_args</span><span class="p">,</span> <span class="o">**</span><span class="n">cleanup1_kwargs</span><span class="p">)</span>
<span class="n">handler</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">cleanup2_func</span><span class="p">,</span> <span class="o">*</span><span class="n">cleanup2_args</span><span class="p">,</span> <span class="o">**</span><span class="n">cleanup2_kwargs</span><span class="p">)</span>
<span class="k">with</span> <span class="n">handler</span><span class="p">:</span>
<span class="n">do_something</span><span class="p">()</span>
</pre></div>
</div>
<p>Or for one cleanup function:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="n">ErrorHandler</span><span class="p">(</span><span class="n">func</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">):</span>
<span class="n">do_something</span><span class="p">()</span>
</pre></div>
</div>
<p>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.</p>
<p>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.</p>
<dl class="method">
<dt id="certbot.error_handler.ErrorHandler.register">
<code class="descname">register</code><span class="sig-paren">(</span><em>func</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot/error_handler.html#ErrorHandler.register"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot.error_handler.ErrorHandler.register" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets func to be run with the given arguments during cleanup.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>func</strong> (<em>function</em>) – function to be called in case of an error</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="certbot.error_handler.ErrorHandler._call_registered">
<code class="descname">_call_registered</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot/error_handler.html#ErrorHandler._call_registered"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot.error_handler.ErrorHandler._call_registered" title="Permalink to this definition">¶</a></dt>
<dd><p>Calls all registered functions</p>
</dd></dl>
<dl class="method">
<dt id="certbot.error_handler.ErrorHandler._set_signal_handlers">
<code class="descname">_set_signal_handlers</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot/error_handler.html#ErrorHandler._set_signal_handlers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot.error_handler.ErrorHandler._set_signal_handlers" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets signal handlers for signals in _SIGNALS.</p>
</dd></dl>
<dl class="method">
<dt id="certbot.error_handler.ErrorHandler._reset_signal_handlers">
<code class="descname">_reset_signal_handlers</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot/error_handler.html#ErrorHandler._reset_signal_handlers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot.error_handler.ErrorHandler._reset_signal_handlers" title="Permalink to this definition">¶</a></dt>
<dd><p>Resets signal handlers for signals in _SIGNALS.</p>
</dd></dl>
<dl class="method">
<dt id="certbot.error_handler.ErrorHandler._signal_handler">
<code class="descname">_signal_handler</code><span class="sig-paren">(</span><em>signum</em>, <em>unused_frame</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot/error_handler.html#ErrorHandler._signal_handler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot.error_handler.ErrorHandler._signal_handler" title="Permalink to this definition">¶</a></dt>
<dd><p>Replacement function for handling received signals.</p>
<p>Store the received signal. If we are executing the code block in
the body of the context manager, stop by raising signal exit.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>signum</strong> (<em>int</em>) – number of current signal</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="certbot.error_handler.ErrorHandler._call_signals">
<code class="descname">_call_signals</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot/error_handler.html#ErrorHandler._call_signals"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot.error_handler.ErrorHandler._call_signals" title="Permalink to this definition">¶</a></dt>
<dd><p>Finally call the deferred signals.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="certbot.error_handler.ExitHandler">
<em class="property">class </em><code class="descclassname">certbot.error_handler.</code><code class="descname">ExitHandler</code><span class="sig-paren">(</span><em>func=None</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot/error_handler.html#ExitHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot.error_handler.ExitHandler" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#certbot.error_handler.ErrorHandler" title="certbot.error_handler.ErrorHandler"><code class="xref py py-class docutils literal"><span class="pre">certbot.error_handler.ErrorHandler</span></code></a></p>
<p>Context manager for running code that must be cleaned up.</p>
<p>Subclass of ErrorHandler, with the same usage and parameters.
In addition to cleaning up on all signals, also cleans up on
regular exit.</p>
</dd></dl>
</div>
</div>
<div class="articleComments">
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="errors.html" class="btn btn-neutral float-right" title="certbot.errors" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="eff.html" class="btn btn-neutral" title="certbot.eff" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
<span class="copyright">
© Copyright 2014-2018 - The Certbot software and documentation are licensed under the Apache 2.0 license as described at <a href="https://eff.org/cb-license">https://eff.org/cb-license</a>.
</span>
<br>
<br>
<span class="status">
<a href="https://letsencrypt.status.io/">Let's Encrypt Status</a>
</span>
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'0.23.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
|