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