curl-and-python

Re: keyboardinterrupt and aborting perform()

From: <johansen_at_sun.com>
Date: Tue, 1 Sep 2009 13:03:26 -0700

On Tue, Sep 01, 2009 at 03:53:14PM -0400, Seth Vidal wrote:
> Now the first ctrl-c works but I can't seem to see if I'm not properly
> killing the execution. Is there a better/nicer way to shutdown the
> perform() call? Maybe something I can return from the progressfunction to
> tell curl to stop?

I use the progress function approach. If the callback returns a
non-zero value, curl considers the operation aborted and returns
E_ABORTED_BY_CALLBACK as the status for the request.

-j
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2009-09-01