From 21f3ea412a62da57b6a92b06a33a6c1199724aaa Mon Sep 17 00:00:00 2001 From: Kunming Qu <37601826+kunmingg@users.noreply.github.com> Date: Tue, 17 Jul 2018 17:55:18 -0700 Subject: [PATCH] test fix: None type check (#735) --- py/tf_job_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/tf_job_client.py b/py/tf_job_client.py index 77b51c7d2c..015f0733bd 100644 --- a/py/tf_job_client.py +++ b/py/tf_job_client.py @@ -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"),