From a54e370f1471eb3920f218e56e6c1e4399d5675f Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 16 Oct 2019 22:13:51 +0200 Subject: [PATCH] catch ValueError exception while merge annotation dicts --- ansibledoctor/Annotation.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ansibledoctor/Annotation.py b/ansibledoctor/Annotation.py index e77672d..5664b7a 100644 --- a/ansibledoctor/Annotation.py +++ b/ansibledoctor/Annotation.py @@ -72,8 +72,10 @@ class Annotation: def _populate_item(self, item): for key, value in item: - anyconfig.merge(self._all_items[key], - value, ac_merge=anyconfig.MS_DICTS) + try: + anyconfig.merge(self._all_items[key], value, ac_merge=anyconfig.MS_DICTS) + except ValueError as e: + self.log.sysexit_with_message("Unable to merge annotation values:\n{}".format(e)) def _get_annotation_data(self, num, line, name, rfile): """