<!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>copr.v3.exceptions — python-copr 1.63 documentation</title> <script type="text/javascript" src="../../../_static/js/modernizr.min.js"></script> <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script> <script type="text/javascript" src="../../../_static/js/theme.js"></script> <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" /> <link rel="index" title="Index" href="../../../genindex.html" /> <link rel="search" title="Search" href="../../../search.html" /> </head> <body class="wy-body-for-nav"> <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"> python-copr </a> <div class="version"> 1.63 </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="../../../installation.html">Installation</a></li> </ul> <ul> <li class="toctree-l1"><a class="reference internal" href="../../../ClientV1.html">Legacy client</a></li> <li class="toctree-l1"><a class="reference internal" href="../../../ClientV2.html">Client version 2</a></li> <li class="toctree-l1"><a class="reference internal" href="../../../ClientV3.html">Client version 3</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <nav class="wy-nav-top" aria-label="top navigation"> <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="../../../index.html">python-copr</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="../../index.html">Module code</a> »</li> <li>copr.v3.exceptions</li> <li class="wy-breadcrumbs-aside"> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <h1>Source code for copr.v3.exceptions</h1><div class="highlight"><pre> <span></span><span class="kn">from</span> <span class="nn">munch</span> <span class="k">import</span> <span class="n">Munch</span> <div class="viewcode-block" id="CoprException"><a class="viewcode-back" href="../../../client_v3/error_handling.html#copr.v3.exceptions.CoprException">[docs]</a><span class="k">class</span> <span class="nc">CoprException</span><span class="p">(</span><span class="ne">Exception</span><span class="p">):</span> <span class="sd">"""</span> <span class="sd"> Base Copr exception</span> <span class="sd"> """</span> <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">msg</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">response</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span> <span class="nb">super</span><span class="p">(</span><span class="n">CoprException</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">result</span> <span class="o">=</span> <span class="n">Munch</span><span class="p">(</span><span class="n">error</span><span class="o">=</span><span class="n">msg</span><span class="p">,</span> <span class="n">__response__</span><span class="o">=</span><span class="n">response</span><span class="p">)</span></div> <div class="viewcode-block" id="CoprRequestException"><a class="viewcode-back" href="../../../client_v3/error_handling.html#copr.v3.exceptions.CoprRequestException">[docs]</a><span class="k">class</span> <span class="nc">CoprRequestException</span><span class="p">(</span><span class="n">CoprException</span><span class="p">):</span> <span class="sd">"""</span> <span class="sd"> Raised when the API request doesn't proceed successfully</span> <span class="sd"> """</span> <span class="k">pass</span></div> <div class="viewcode-block" id="CoprNoResultException"><a class="viewcode-back" href="../../../client_v3/error_handling.html#copr.v3.exceptions.CoprNoResultException">[docs]</a><span class="k">class</span> <span class="nc">CoprNoResultException</span><span class="p">(</span><span class="n">CoprException</span><span class="p">):</span> <span class="sd">"""</span> <span class="sd"> Raised when no result data is returned</span> <span class="sd"> """</span> <span class="k">pass</span></div> <div class="viewcode-block" id="CoprTimeoutException"><a class="viewcode-back" href="../../../client_v3/error_handling.html#copr.v3.exceptions.CoprTimeoutException">[docs]</a><span class="k">class</span> <span class="nc">CoprTimeoutException</span><span class="p">(</span><span class="n">CoprException</span><span class="p">):</span> <span class="sd">"""</span> <span class="sd"> Raised when the API request timeouted</span> <span class="sd"> """</span> <span class="k">pass</span></div> <div class="viewcode-block" id="CoprValidationException"><a class="viewcode-back" href="../../../client_v3/error_handling.html#copr.v3.exceptions.CoprValidationException">[docs]</a><span class="k">class</span> <span class="nc">CoprValidationException</span><span class="p">(</span><span class="n">CoprException</span><span class="p">):</span> <span class="sd">"""</span> <span class="sd"> Raised when the data sent from client to API are not valid</span> <span class="sd"> """</span> <span class="k">pass</span></div> <div class="viewcode-block" id="CoprNoConfigException"><a class="viewcode-back" href="../../../client_v3/error_handling.html#copr.v3.exceptions.CoprNoConfigException">[docs]</a><span class="k">class</span> <span class="nc">CoprNoConfigException</span><span class="p">(</span><span class="n">CoprException</span><span class="p">):</span> <span class="sd">"""</span> <span class="sd"> Exception thrown when no config file is found</span> <span class="sd"> """</span> <span class="k">pass</span></div> <div class="viewcode-block" id="CoprConfigException"><a class="viewcode-back" href="../../../client_v3/error_handling.html#copr.v3.exceptions.CoprConfigException">[docs]</a><span class="k">class</span> <span class="nc">CoprConfigException</span><span class="p">(</span><span class="n">CoprException</span><span class="p">):</span> <span class="sd">"""</span> <span class="sd"> Exception thrown when the config file is incomplete or malformed.</span> <span class="sd"> """</span> <span class="k">pass</span></div> </pre></div> </div> </div> <footer> <hr/> <div role="contentinfo"> <p> © Copyright 2018, Red Hat, Inc. </p> </div> Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/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"> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> </body> </html>