We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bf63f59 + b3e51c4 commit b839eeeCopy full SHA for b839eee
1 file changed
examples/pod_exec.py
@@ -117,8 +117,11 @@ def exec_commands(api_instance):
117
118
def main():
119
config.load_kube_config()
120
- c = Configuration()
121
- c.assert_hostname = False
+ try:
+ c = Configuration().get_default_copy()
122
+ except AttributeError:
123
+ c = Configuration()
124
+ c.assert_hostname = False
125
Configuration.set_default(c)
126
core_v1 = core_v1_api.CoreV1Api()
127
0 commit comments