jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] config2: Use list for _DifferentTypeError ......................................................................
[FIX] config2: Use list for _DifferentTypeError
In 32a6d0aa the _DifferentTypeError was introduced which additionally shows the valid types for a variable. The valid types need to be supplied via a list as it otherwise tries to iterate over a type.
Change-Id: I8f1f7a6fa93e097fbcf41bbe0f285c1ba950d425 --- M pywikibot/config2.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/config2.py b/pywikibot/config2.py index b103010..b8898fd 100644 --- a/pywikibot/config2.py +++ b/pywikibot/config2.py @@ -964,7 +964,7 @@ elif isinstance(value, int) and isinstance(default_value, float): return float(value) else: - raise _DifferentTypeError(name, type(value), type(default_value)) + raise _DifferentTypeError(name, type(value), [type(default_value)])
def _assert_types(name, value, types):