mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #25694 from s0undt3ch/2015.5
Salt-SSH fix for #25689
This commit is contained in:
commit
fe829564f4
2 changed files with 8 additions and 4 deletions
|
@ -631,6 +631,7 @@ class Single(object):
|
|||
'root_dir': os.path.join(self.thin_dir, 'running_data'),
|
||||
'id': self.id,
|
||||
'sock_dir': '/',
|
||||
'log_file': 'salt-call.log'
|
||||
})
|
||||
self.minion_config = yaml.dump(self.minion_opts)
|
||||
self.target = kwargs
|
||||
|
|
|
@ -68,8 +68,6 @@ except ImportError:
|
|||
HAS_CERTIFI = False
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
JARFILE = os.path.join(syspaths.CACHE_DIR, 'cookies.txt')
|
||||
SESSIONJARFILE = os.path.join(syspaths.CACHE_DIR, 'cookies.session.p')
|
||||
USERAGENT = 'Salt/{0}'.format(salt.version.__version__)
|
||||
|
||||
|
||||
|
@ -90,10 +88,10 @@ def query(url,
|
|||
headers=False,
|
||||
text=False,
|
||||
cookies=None,
|
||||
cookie_jar=JARFILE,
|
||||
cookie_jar=None,
|
||||
cookie_format='lwp',
|
||||
persist_session=False,
|
||||
session_cookie_jar=SESSIONJARFILE,
|
||||
session_cookie_jar=None,
|
||||
data_render=False,
|
||||
data_renderer=None,
|
||||
header_render=False,
|
||||
|
@ -178,6 +176,11 @@ def query(url,
|
|||
if header_list is None:
|
||||
header_list = []
|
||||
|
||||
if cookie_jar is None:
|
||||
cookie_jar = os.path.join(opts.get('cachedir', syspaths.CACHE_DIR), 'cookies.txt')
|
||||
if session_cookie_jar is None:
|
||||
session_cookie_jar = os.path.join(opts.get('cachedir', syspaths.CACHE_DIR), 'cookies.session.p')
|
||||
|
||||
if persist_session is True and HAS_MSGPACK:
|
||||
# TODO: This is hackish; it will overwrite the session cookie jar with
|
||||
# all cookies from this one connection, rather than behaving like a
|
||||
|
|
Loading…
Add table
Reference in a new issue