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

Better fix for opensuse tornado httpclient #26517

Merged
merged 1 commit into from
Aug 20, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Better fix for opensuse tornado httpclient
  • Loading branch information
Jenkins committed Aug 20, 2015
commit e8c9ffef7e7e2869a2e38fc59dcf2225a0cc7e64
5 changes: 3 additions & 2 deletions salt/utils/http.py
Original file line number Diff line number Diff line change
@@ -55,6 +55,7 @@

# Don't need a try/except block, since Salt depends on tornado
import tornado.httputil
import tornado.simple_httpclient
from tornado.httpclient import HTTPClient

try:
@@ -404,8 +405,8 @@ def query(url,
max_body = opts.get('http_max_body', salt.config.DEFAULT_MINION_OPTS['http_max_body'])
timeout = opts.get('http_request_timeout', salt.config.DEFAULT_MINION_OPTS['http_request_timeout'])

client_argspec = inspect.getargspec(HTTPClient.__init__)
supports_max_body_size = 'kwargs' in client_argspec.keywords or 'max_body_size' in client_argspec.args
client_argspec = inspect.getargspec(tornado.simple_httpclient.SimpleAsyncHTTPClient.initialize)
supports_max_body_size = 'max_body_size' in client_argspec.args

try:
if supports_max_body_size: