jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/458129 )
Change subject: [bugfix] Do not show empty error messages ......................................................................
[bugfix] Do not show empty error messages
Bug: T203462 Change-Id: I161c11194fd6287fee205c0fa03a8b1a5d7096cb --- M pywikibot/bot.py 1 file changed, 4 insertions(+), 3 deletions(-)
Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py index d450a6d..e9900eb 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -1084,9 +1084,10 @@ if unknown_parameters: additional_text = 'Unknown parameter(s) "{0}"\n'.format( '", "'.join(unknown_parameters)) + additional_text - if not additional_text.endswith('\n'): - additional_text += '\n' - error(additional_text + 'Use -help for further information.') + if additional_text: + if not additional_text.endswith('\n'): + additional_text += '\n' + error(additional_text + 'Use -help for further information.')
def writeToCommandLogFile():