24 Mar 2012 12:56
Re: timing out
On Sat, Mar 24, 2012 at 11:51, Tomáš Hnyk <tomashnyk <at> gmail.com> wrote: > > and it has been hanging at this for about two minutes now and counting. > Should not it raise some sort of exception, or is it going to wait for > something indefinitely? :-/ It's very possible that it will wait until the end of time, I fear. > I was originally asking if there were a way to set a timeout to retrieving > film info. Is there some internal timeout in imdbpy after which it justs > gives up? My fault: I misunderstood the problem. No, IMDbPY uses urllib, and it doesn't provide a way to set a timeout. urllib2 has it, but only in very recent python versions, so I'd prefer not to use it (and, by the way, a conversion from urllib to urllib2 would take me some time). > I found a way to do this on in internet: > import signal Yes, it's more or less reasonable, but I want to think twice about it, before I introduce an alarm in the IMDbPY code... after all i's a library and it could heavily interfere with signal handling made by the programs that uses it.(Continue reading)Real point is, it's very strange that it happens so methodically on your system... I think I've never seen it hangs during a request.
Real point is, it's very strange that it happens so methodically on
your system... I think I've never seen it hangs during a request.
I've introduced a 'timeout' parameter, set by default to 30 seconds.
Please anyone report any strange behavior.
RSS Feed