Skip to content

Commit ca384e9

Browse files
add comment
1 parent 1387b03 commit ca384e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

oc/od/orchestrator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4437,6 +4437,10 @@ def describe_desktop_byname( self, name:str )->dict:
44374437
"""
44384438
self.logger.debug('')
44394439
assert isinstance(name, str), f"name has invalid type {type(str)}"
4440+
# Looking at the source code for core_v1_api.py.
4441+
# The method calls accept a kwarg named _preload_content.
4442+
# Setting the argument _preload_content to False instructs the method to return the urllib3.HTTPResponse object instead of a processed str.
4443+
# You can then work directly with the data, which cooperates with json.loads().
44404444
myPod = self.kubeapi.read_namespaced_pod(namespace=self.namespace, name=name, _preload_content=False)
44414445
if isinstance( myPod, urllib3.response.HTTPResponse ) :
44424446
myPod = json.loads( myPod.data )

0 commit comments

Comments
 (0)