Merge pull request #2157 from rafrafek/patch-1

Avoid shadowing important built-ins in the example code
This commit is contained in:
Kubernetes Prow Robot 2024-11-27 15:18:58 +00:00 committed by GitHub
commit 98a5be84a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -152,8 +152,8 @@ class Watch(object):
v1 = kubernetes.client.CoreV1Api()
watch = kubernetes.watch.Watch()
for e in watch.stream(v1.list_namespace, resource_version=1127):
type = e['type']
object = e['object'] # object is one of type return_type
type_ = e['type']
object_ = e['object'] # object is one of type return_type
raw_object = e['raw_object'] # raw_object is a dict
...
if should_stop: