jenkins-bot merged this change.

View Change

Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
[bugfix] Do not show empty error messages

Bug: T203462
Change-Id: I161c11194fd6287fee205c0fa03a8b1a5d7096cb
---
M pywikibot/bot.py
1 file changed, 4 insertions(+), 3 deletions(-)

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():

To view, visit change 458129. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I161c11194fd6287fee205c0fa03a8b1a5d7096cb
Gerrit-Change-Number: 458129
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: jenkins-bot (75)