[Yum-devel] [UG] ctrl-c not doing what is expected

seth vidal skvidal at phy.duke.edu
Sun Apr 17 18:21:35 UTC 2005


On Sun, 2005-04-17 at 11:14 -0400, seth vidal wrote:
> On Sun, 2005-04-17 at 15:06 +0200, Gijs Hollestelle wrote:
> > On 4/16/05, seth vidal <skvidal at phy.duke.edu> wrote:
> > > Hey guys,
> > >  Have we ever gotten to the bottom of the ctrl-c skips-to-next-mirror
> > > instead of exiting, problem? I'm asking b/c if there's a way to make it
> > > just exit like folks expect I'd be in favor of it, I think.
> > 
> > I agree it should just exit, but I don't think this will be easy to
> > fix because there is no way to distinguish between the user pressing
> > ctrl-c and a network error. In both cases python throws a a
> > socket.error which grabber.py catches.
> > 
> 
> Here's the odd thing.
> 
> check urlgrabber out of its cvs then run:
> 
> python ./grab -d url://to/some/file
> 
> and ctrl-c it
> 
> you get the KeyboardInterrupt exception.
> 
> so its getting through to somewhere.
> 
> I'm looking for it now

okay it looks like it has to do with the opener that you use. The
default urllib2 opener will pass the KeyboardInterrupt exception back on
through to the calling function.

so it might be buried in one of the other callers.

<sigh> I wonder if socket.error #11 is ever issued for anything else.

-sv





More information about the Yum-devel mailing list