Skip to content

Commit

Permalink
test fix: None type check (#735)
Browse files Browse the repository at this point in the history
  • Loading branch information
kunmingg authored and k8s-ci-robot committed Jul 18, 2018
1 parent 9e396a4 commit 21f3ea4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/tf_job_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def log_status(tf_job):
"""A callback to use with wait_for_job."""
if tf_job.get("apiVersion", "") == "kubeflow.org/v1alpha2":
all_conditions = tf_job.get("status", {}).get("conditions", [])
conditions = [c.get("type", "") for c in all_conditions]
conditions = [] if all_conditions is None else [c.get("type", "") for c in all_conditions]
logging.info("Job %s in namespace %s; uid=%s; conditions=%s",
tf_job.get("metadata", {}).get("name"),
tf_job.get("metadata", {}).get("namespace"),
Expand Down

0 comments on commit 21f3ea4

Please sign in to comment.