Skip to content

Timeout parameter change (Bug #34)#35

Merged
aiantsen merged 1 commit intozabbix:release/2.0.4from
umoshamm:bug-#34
Dec 16, 2025
Merged

Timeout parameter change (Bug #34)#35
aiantsen merged 1 commit intozabbix:release/2.0.4from
umoshamm:bug-#34

Conversation

@umoshamm
Copy link
Copy Markdown
Contributor

@umoshamm umoshamm commented Sep 4, 2025

updated api.py function send_api_request to pass the timeout parameter to the urlopen function instead of the Request object.

…ter to the urlopen function instead of the Request object.
Comment thread zabbix_utils/api.py

try:
resp = ul.urlopen(req, context=ctx)
if self.timeout:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we want to check if the timeout is set before passing it?
urlopen uses the socket's global default which, according to the docs, is None by default.

So IMO, we don't need to be defensive here and just pass the timeout, no matter what.

NOTE: I am not affiliated with zabbix_utils, merely a user of the project.

@BBT-coder
Copy link
Copy Markdown

It would be nice if this could be resolved, it's open to long ....

@aiantsen aiantsen changed the base branch from main to release/2.0.4 December 16, 2025 07:34
@aiantsen aiantsen merged commit 08792a8 into zabbix:release/2.0.4 Dec 16, 2025
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

Successfully merging this pull request may close these issues.

4 participants