Merge pull request #1401 from Akasurde/i1396

examples/pod_exec.py: fix example
This commit is contained in:
Kubernetes Prow Robot 2021-03-29 18:27:58 -07:00 committed by GitHub
commit b839eee939
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,8 +117,11 @@ def exec_commands(api_instance):
def main():
config.load_kube_config()
c = Configuration()
c.assert_hostname = False
try:
c = Configuration().get_default_copy()
except AttributeError:
c = Configuration()
c.assert_hostname = False
Configuration.set_default(c)
core_v1 = core_v1_api.CoreV1Api()