jenkins-bot merged this change.

View Change

Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
[IMMPR] Do not raise a RuntimeError if user-config.py is missing

config2.py raises a RuntimeError if user-config.py is required but
not present. This looks ugly. Especially if operators are setting up
their bot they expect a pleasant hint instead of a traceback. And
developers usually know about this issue and do not need the code
snippet for debugging.

Change-Id: I15f7a6f356408e7113362745e81ec7758e9a01ab
---
M pywikibot/config2.py
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index d57ed60..b32710a 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -368,7 +368,8 @@
'location.\n'
' Directory where user-config.py is searched is determined '
'as follows:\n\n ') + get_base_dir.__doc__
- raise RuntimeError(exc_text)
+ output(exc_text)
+ sys.exit(1)

return base_dir


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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I15f7a6f356408e7113362745e81ec7758e9a01ab
Gerrit-Change-Number: 599034
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)