jenkins-bot submitted this change.
[bugfix] Improve _get_option_with_fallback logic in harvest_template.py
Do not return False but True if local and default boolean options are True.
Because the local option cannot be overridden by a False value it is
surely intended to return True if the default is True even the local
option was still False.
Change-Id: I0384adb0b7529696fa29ddc4216177f80b38b6bf
---
M scripts/harvest_template.py
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py
index 7bf679c..ab03f1b 100755
--- a/scripts/harvest_template.py
+++ b/scripts/harvest_template.py
@@ -258,11 +258,7 @@
.. seealso:: :class:`OptionHandler`
"""
- default = self.opt[option]
- local = handler.opt[option]
- if isinstance(default, bool) and isinstance(local, bool):
- return default is not local
- return local or default
+ return handler.opt[option] or self.opt[option]
def treat_page_and_item(self,
page: pywikibot.page.BasePage,
To view, visit change 810938. To unsubscribe, or for help writing mail filters, visit settings.