mmnode-ticker: support --http-timeout option

This commit is contained in:
The MMGen Project 2025-10-04 09:57:02 +00:00
commit b9957f9182
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
2 changed files with 5 additions and 1 deletions

View file

@ -75,6 +75,7 @@ class DataSource:
['--compressed'], # adds 'Accept-Encoding: gzip'
['--proxy', cfg.proxy, isinstance(cfg.proxy, str)],
['--silent', not cfg.verbose],
['--connect-timeout', str(gcfg.http_timeout), gcfg.http_timeout],
[self.api_url])
if gcfg.testing:
@ -290,6 +291,9 @@ class DataSource:
if gcfg.test_suite:
kwargs.update({'timeout': 1, 'retry': 0})
if gcfg.http_timeout:
kwargs.update({'timeout': gcfg.http_timeout})
if gcfg.testing:
Msg('\nyahooquery.Ticker(\n {},\n {}\n)'.format(
self.symbols,

View file

@ -1 +1 @@
3.6.dev1
3.6.dev2