From 59031de6d03e121e19565caa00ada9ad0b451da0 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Jun 19 2019 16:29:13 +0000 Subject: Don't crash if the message doesn't have a 'status' This should never happen, but currently it actually is because I misconfigured the AMQP queue in infra. D'oh. This is a good and safe fix anyhow. Signed-off-by: Adam Williamson --- diff --git a/relvalconsumer.py b/relvalconsumer.py index c9b2d05..73b9de3 100644 --- a/relvalconsumer.py +++ b/relvalconsumer.py @@ -49,7 +49,7 @@ class RelvalConsumer(object): test mode. """ # only run on completed composes - status = message.body.get('status') + status = message.body.get('status', '') cid = message.body.get('compose_id') if not 'FINISHED' in status and cid: return