On Mon, May 16, 2011 at 12:32 AM, Christoph Scheingraber <ch...@spam.org> wrote:
> I now have signal.siginterrupt(signal.SIGINT, False) in the line
> below signal.signal(signal.SIGINT, interrupt_handler)
>
> Unfortunately, pressing ^c still results in the same interrupt error. I
> also tried putting signal.siginterrupt into the interrupt_handler
> function, which gave an interesting result:
>    File "/usr/local/bin/obspysod", line 586, in interrupt_handler
>    signal.siginterrupt(signal.SIGINT, False)
>    AttributeError: 'int' object has no attribute 'siginterrupt'
>
> Could there be a namespace problem?

def interrupt_handler(signal, frame):

You're using 'signal' as a parameter here. The local int is masking
the global module.

Chris Angelico
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to