You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
method_call.py and upload.py call requests.post to do their work but don't pass a timeout argument to the call, but should. From the requests documentation:
You can tell Requests to stop waiting for a response after a given number of seconds with the timeout parameter. Nearly all production code should use this parameter in nearly all requests. Failure to do so can cause your program to hang indefinitely:
I did the simplest thing possible, just stuff in a hardcoded timeout of 75s (I was editing my flickr-api installation), but giving the caller a simple API for setting the timeout value would obviously be better. Defaulting to None would preserve the current behavior. I've attached my quick-n-dirty change but will try to work up a more reasonable PR.
Yeah, I was kinda in a hurry and just wanted something I felt would work so I could ignore that issue. The timeout will be settable (see attached). timeout.txt
method_call.py
andupload.py
callrequests.post
to do their work but don't pass atimeout
argument to the call, but should. From therequests
documentation:I did the simplest thing possible, just stuff in a hardcoded timeout of 75s (I was editing my
flickr-api
installation), but giving the caller a simple API for setting the timeout value would obviously be better. Defaulting toNone
would preserve the current behavior. I've attached my quick-n-dirty change but will try to work up a more reasonable PR.timeout.txt
The text was updated successfully, but these errors were encountered: