Sorry about this. I didn't realize that this would fail just by setting up the handler in a non-main thread. Is there an easy, portable way to check if we are in the main thread?
Would it be enough if I made a patch that let you hook pudb.DEFAULT_SIGNAL to None, which would prevent any signal handling from being setup at all? Aaron Meurer On Tue, Apr 9, 2013 at 12:20 PM, Andreas Kloeckner <[email protected]> wrote: > Hi John, > > John Anderson <[email protected]> writes: >> Hey, I'm trying to use pudb to debug my web application but it tries to use >> signal, which can only be used in the main thread. Web requests will not >> be in the main thread. >> >> I was able to comment out the set_interrupt_handler call in set_trace and >> everything seems to work just fine. Maybe you could check if its the main >> thread and if not ignore the signal calls? > > Can you send a traceback? I'd probably simply be brutal about it. If the > signal() call fails, catch that, and forget I said anything. > > Andreas > > Btw, cc'd the pudb list. Hope that's ok. > > _______________________________________________ > Pudb mailing list > [email protected] > http://lists.tiker.net/listinfo/pudb _______________________________________________ Pudb mailing list [email protected] http://lists.tiker.net/listinfo/pudb
