Hi,<br><br>I have a project that was frozen for some time, but have to restart work on it again. It basically integrates bazaar, and has a line that reads<br><br>from bzrlib import branch, bzrdir<br><br>nothing fancy, uh<br>
<br>the problem is, that branch would import bzrlib.lock, that imports brzlib.error what finally imports bzrlib.osutils, and at line 1446 osutils calls <br><br>signal.signal(signal.SIGWINCH, _terminal_size_changed)<br><br>
and a traceback is thrown:<br><br>  File &quot;/home/nagyv/workspace/CooSci/webapp/bzr/util.py&quot;, line 2, in &lt;module&gt;<br>    from bzrlib import branch, bzrdir<br>  File &quot;/home/nagyv/virtualenv/coosci/lib/python2.5/site-packages/bzrlib/branch.py&quot;, line 52, in &lt;module&gt;<br>
    from bzrlib.lock import _RelockDebugMixin<br>  File &quot;/home/nagyv/virtualenv/coosci/lib/python2.5/site-packages/bzrlib/lock.py&quot;, line 42, in &lt;module&gt;<br>    from bzrlib import (<br>  File &quot;/home/nagyv/virtualenv/coosci/lib/python2.5/site-packages/bzrlib/errors.py&quot;, line 20, in &lt;module&gt;<br>
    from bzrlib import (<br>  File &quot;/home/nagyv/virtualenv/coosci/lib/python2.5/site-packages/bzrlib/osutils.py&quot;, line 1446, in &lt;module&gt;<br>    signal.signal(signal.SIGWINCH, _terminal_size_changed)<br>ValueError: signal only works in main thread<br>
<br>The import above worked with some old version of bazaar, but it would be nice to update the code for bazaar 2.1 at least. So, could someone help me in changing the code above so that is will run fine?<br><br>thanks a lot,<br>
Viktor<br>