From e2e34674c26dc6c0b88e997ac849f5b88d8df5d4 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Tue, 1 Feb 2022 16:22:12 +0000 Subject: [PATCH] eddn: codexentry - add paranoia post-processing check of values --- plugins/eddn.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/eddn.py b/plugins/eddn.py index 95317c3c..7cfda84b 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -951,6 +951,10 @@ class EDDN: entry['BodyID'] = this.body_id ####################################################################### + for k, v in entry.items(): + if v is None or isinstance(v, str) and v == '': + logger.warning(f'post-processing entry contains entry["{k}"] = {v}]') + msg = { '$schemaRef': f'https://eddn.edcd.io/schemas/codexentry/1{"/test" if is_beta else ""}', 'message': entry