jenkins-bot merged this change.
[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.