Skip to content

Commit 77a504e

Browse files
committed
Fix exec example to use new configuration model
1 parent bc2aac4 commit 77a504e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

examples/exec.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import time
22

33
from kubernetes import config
4-
from kubernetes.client import configuration
4+
from kubernetes.client import Configuration
55
from kubernetes.client.apis import core_v1_api
66
from kubernetes.client.rest import ApiException
77
from kubernetes.stream import stream
88

99
config.load_kube_config()
10-
configuration.assert_hostname = False
10+
c = Configuration()
11+
c.assert_hostname = False
12+
Configuration.set_default(c)
1113
api = core_v1_api.CoreV1Api()
1214
name = 'busybox-test'
1315

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
tests_require=TESTS_REQUIRES,
4747
packages=['kubernetes', 'kubernetes.client', 'kubernetes.config',
4848
'kubernetes.watch', 'kubernetes.client.apis',
49-
'kubernetes.client.models', 'kubernetes.stream'],
49+
'kubernetes.stream', 'kubernetes.client.models'],
5050
include_package_data=True,
5151
long_description="""\
5252
Python client for kubernetes http://kubernetes.io/

0 commit comments

Comments
 (0)