Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow setting timeout #19

Closed
cbasix opened this issue Nov 20, 2019 · 2 comments
Closed

[Feature Request] Allow setting timeout #19

cbasix opened this issue Nov 20, 2019 · 2 comments

Comments

@cbasix
Copy link

cbasix commented Nov 20, 2019

It would be great if it where possible to set the timeouts for outgoing http requests (and therefore for the used requests module and lxml).

Motivation: i do have a use case where i would prefer the FritzConnection to fall rather than to stall the execution for two minutes.

Minimal Example:

start = datetime.now()
try:
    fc = FritzConnection("google.com")
finally:
    print(datetime.now()-start)

Output: 0:02:00.105666

@kbr
Copy link
Owner

kbr commented Dec 27, 2019

I never thought about a use case like this. But as requests provides timeout, it makes sense to add this feature. Will come with the next release (1.1).

kbr added a commit that referenced this issue Dec 27, 2019
@kbr kbr closed this as completed Dec 28, 2019
@cbasix
Copy link
Author

cbasix commented Dec 30, 2019

Thanks for your effort. Works like a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants