Merge branch 'kubernetes-client:master' into master
This commit is contained in:
commit
5195b657f1
@ -57,11 +57,12 @@ class ExecProvider(object):
|
||||
self.cwd = cwd or None
|
||||
|
||||
def run(self, previous_response=None):
|
||||
is_interactive = sys.stdout.isatty()
|
||||
kubernetes_exec_info = {
|
||||
'apiVersion': self.api_version,
|
||||
'kind': 'ExecCredential',
|
||||
'spec': {
|
||||
'interactive': sys.stdout.isatty()
|
||||
'interactive': is_interactive
|
||||
}
|
||||
}
|
||||
if previous_response:
|
||||
@ -70,7 +71,8 @@ class ExecProvider(object):
|
||||
process = subprocess.Popen(
|
||||
self.args,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
stderr=sys.stderr if is_interactive else subprocess.PIPE,
|
||||
stdin=sys.stdin if is_interactive else None,
|
||||
cwd=self.cwd,
|
||||
env=self.env,
|
||||
universal_newlines=True)
|
||||
|
||||
@ -45,7 +45,7 @@ class Discoverer(object):
|
||||
default_cache_id = self.client.configuration.host
|
||||
if six.PY3:
|
||||
default_cache_id = default_cache_id.encode('utf-8')
|
||||
default_cachefile_name = 'osrcp-{0}.json'.format(hashlib.md5(default_cache_id).hexdigest())
|
||||
default_cachefile_name = 'osrcp-{0}.json'.format(hashlib.md5(default_cache_id, usedforsecurity=False).hexdigest())
|
||||
self.__cache_file = cache_file or os.path.join(tempfile.gettempdir(), default_cachefile_name)
|
||||
self.__init_cache()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user