Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kale/common/podutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ def get_container_name():
candidates = [c for c in container_names if all(x not in c for x in potentially_sidecar_names)]
if len(candidates) > 1:
raise RuntimeError(
"Too many container candidates.Cannot infer the"
"Too many container candidates. Cannot infer the"
f" name of the current container from: {candidates} "
)
if len(candidates) > 0:
if len(candidates) == 0:
raise RuntimeError(
"No container names left. Could not infer the name of the running container."
)
Expand Down
4 changes: 2 additions & 2 deletions kale/rpc/kfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ def _get_pipeline_id(pipeline_name):
client = _get_client()
token = ""
pipeline_id = None
while pipeline_id is None or token is not None:
while pipeline_id is None and token is not None:
pipelines = client.list_pipelines(page_token=token)
token = pipelines.next_page_token
f = next(filter(lambda x: x.display_name == pipeline_name, pipelines.pipelines), None)
f = next(filter(lambda x: x.display_name == pipeline_name, pipelines.pipelines or []), None)
if f is not None:
pipeline_id = f.pipeline_id
return pipeline_id
Expand Down
Loading