From 343633a1893ba7fe8bac2ebd9e8235582fabbc20 Mon Sep 17 00:00:00 2001 From: prculley Date: Mon, 16 Mar 2020 11:40:23 -0500 Subject: [PATCH] Fix some reports for CLI where warning message about Value not found Fixes #11621 --- gramps/gen/plug/menu/_enumeratedlist.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gramps/gen/plug/menu/_enumeratedlist.py b/gramps/gen/plug/menu/_enumeratedlist.py index be1f5718d..51e716819 100644 --- a/gramps/gen/plug/menu/_enumeratedlist.py +++ b/gramps/gen/plug/menu/_enumeratedlist.py @@ -62,6 +62,7 @@ class EnumeratedListOption(Option): :type value: int :return: nothing """ + self.ini_value = value Option.__init__(self, label, value) self.__items = [] self.__xml_items = [] @@ -138,6 +139,8 @@ class EnumeratedListOption(Option): """ if value in (v for v, d in self.__items): Option.set_value(self, value) + elif value == self.ini_value: + return else: logging.warning(_("Value '%(val)s' not found for option '%(opt)s'") % {'val' : str(value), 'opt' : self.get_label()})