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

how can i set timeout in client #3

Open
alexkie007 opened this issue Oct 30, 2017 · 2 comments
Open

how can i set timeout in client #3

alexkie007 opened this issue Oct 30, 2017 · 2 comments

Comments

@alexkie007
Copy link

I can't set the timeout options in client

@charn
Copy link
Member

charn commented Jan 31, 2018

I guess this might not be relevant any more (maybe you have already solved the issue), but I think the following should work:

from suds.client import Client

wsdl_url="https://example.com/wsdl"

client = Client(wsdl_url, timeout=10)

# or

client = Client(wsdl_url)
client.set_options(timeout=10)

@dusyak
Copy link

dusyak commented Feb 8, 2019

Also for handling a timeout error you need to use the following commands:

from socket import timeout

try: 
    response = client.service.some_request_here(some_data_here) 
except timeout:
    proccess_exception_here() 

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

3 participants