>{</span><span class="n">output_dir</span><span class="si">}</span><span class="s1">'</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">archive_path</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s1">'.gz'</span><span class="p">):</span>
            <span class="k">raise</span>

        <span class="c1"># This is extremely hacky but works sometimes...</span>
        <span class="c1"># If extraction failed, try changing the ext