jenkins-bot has submitted this change and it was merged.
Change subject: (bug 59970) show clear error message if httplib2 is not found
......................................................................
(bug 59970) show clear error message if httplib2 is not found
and suggest to git submodule update --init to get it
Change-Id: I6abae2d811311e340f3756d6084c461faff1b3dc
---
M pwb.py
1 file changed, 8 insertions(+), 0 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pwb.py b/pwb.py
index 86c9b9e..b07b0e9 100644
--- a/pwb.py
+++ b/pwb.py
@@ -103,6 +103,14 @@
os.path.join(rewrite_path, 'externals')
] + sys.path[1:]
+# try importing the known externals, and raise an error if they are not found
+try:
+ import httplib2
+except ImportError as e:
+ print("ImportError: %s" % e)
+ print("Did you clone without --recursive? Try running 'git submodule update
--init'.")
+ sys.exit(1)
+
if "PYWIKIBOT2_DIR" not in os.environ:
os.environ["PYWIKIBOT2_DIR"] = os.path.split(__file__)[0]
--
To view, visit
https://gerrit.wikimedia.org/r/112336
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6abae2d811311e340f3756d6084c461faff1b3dc
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>