File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,10 +117,10 @@ def get_container_name():
117117 candidates = [c for c in container_names if all (x not in c for x in potentially_sidecar_names )]
118118 if len (candidates ) > 1 :
119119 raise RuntimeError (
120- "Too many container candidates.Cannot infer the"
120+ "Too many container candidates. Cannot infer the"
121121 f" name of the current container from: { candidates } "
122122 )
123- if len (candidates ) > 0 :
123+ if len (candidates ) == 0 :
124124 raise RuntimeError (
125125 "No container names left. Could not infer the name of the running container."
126126 )
Original file line number Diff line number Diff line change @@ -84,10 +84,10 @@ def _get_pipeline_id(pipeline_name):
8484 client = _get_client ()
8585 token = ""
8686 pipeline_id = None
87- while pipeline_id is None or token is not None :
87+ while pipeline_id is None and token is not None :
8888 pipelines = client .list_pipelines (page_token = token )
8989 token = pipelines .next_page_token
90- f = next (filter (lambda x : x .display_name == pipeline_name , pipelines .pipelines ), None )
90+ f = next (filter (lambda x : x .display_name == pipeline_name , pipelines .pipelines or [] ), None )
9191 if f is not None :
9292 pipeline_id = f .pipeline_id
9393 return pipeline_id
You can’t perform that action at this time.
0 commit comments