diff options
author | Neil Williams <neil.williams@linaro.org> | 2015-07-01 12:14:15 +0100 |
---|---|---|
committer | Linaro Code Review <review@review.linaro.org> | 2015-07-01 13:03:18 +0000 |
commit | 0485e6dcaf19061812d0e571890e58b85b5dea12 (patch) | |
tree | 46fe31bc4f1a3393833679030101a31e78d17fa2 /lava_results_app/utils.py | |
parent | aa2a8ec9fc25023e2e2804682a09f84337ab0414 (diff) |
Return an empty dict if no data
Avoids a HTTP500 on slow instances where the file
may be created before data is written, causing the
YAML parser to return None.
Change-Id: I13b92941f3e368839a9665fe3197c706babd9335
Diffstat (limited to 'lava_results_app/utils.py')
-rw-r--r-- | lava_results_app/utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lava_results_app/utils.py b/lava_results_app/utils.py index 462e8444d..01f9f50f8 100644 --- a/lava_results_app/utils.py +++ b/lava_results_app/utils.py @@ -36,4 +36,6 @@ def description_data(job_id): except yaml.YAMLError: logger.error("Unable to parse description for %s" % job_id) return {} + if not data: + return {} return data |