Skip to content

Commit

Permalink
deploy: 3711257
Browse files Browse the repository at this point in the history
  • Loading branch information
idocx committed Oct 7, 2024
1 parent de19a11 commit 5df7a63
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions _modules/alab_management/resource_manager/resource_requester.html
Original file line number Diff line number Diff line change
Expand Up @@ -387,14 +387,20 @@ <h1>Source code for alab_management.resource_manager.resource_requester</h1><div



<span class="c1"># considering concurrent.futures.TimeoutError and TimeoutError becomes the same</span>
<span class="c1"># from Python 3.11. We should determine the base class of this exception.</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">concurrent</span><span class="o">.</span><span class="n">futures</span><span class="o">.</span><span class="n">TimeoutError</span><span class="p">,</span> <span class="ne">TimeoutError</span><span class="p">):</span>
<span class="n">CombinedTimeoutError</span> <span class="o">=</span> <span class="ne">TimeoutError</span>
<span class="k">else</span><span class="p">:</span>

<div class="viewcode-block" id="CombinedTimeoutError">
<a class="viewcode-back" href="../../../alab_management.resource_manager.resource_requester.html#alab_management.resource_manager.resource_requester.CombinedTimeoutError">[docs]</a>
<span class="k">class</span> <span class="nc">CombinedTimeoutError</span><span class="p">(</span><span class="ne">TimeoutError</span><span class="p">,</span> <span class="n">concurrent</span><span class="o">.</span><span class="n">futures</span><span class="o">.</span><span class="n">TimeoutError</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Combined TimeoutError.</span>
<span class="k">class</span> <span class="nc">CombinedTimeoutError</span><span class="p">(</span><span class="ne">TimeoutError</span><span class="p">,</span> <span class="n">concurrent</span><span class="o">.</span><span class="n">futures</span><span class="o">.</span><span class="n">TimeoutError</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Combined TimeoutError.</span>

<span class="sd"> If you catch either TimeoutError or concurrent.futures.TimeoutError, this will catch both.</span>
<span class="sd"> &quot;&quot;&quot;</span></div>
<span class="sd"> If you catch either TimeoutError or concurrent.futures.TimeoutError, this will catch both.</span>
<span class="sd"> &quot;&quot;&quot;</span></div>



Expand Down

0 comments on commit 5df7a63

Please sign in to comment.