[MediaWiki-commits] [Gerrit] (bug 59970) show clear error message if httplib2 is not found - change (pywikibot/core)

2014-02-09 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/112336

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


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/36/112336/1

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: newchange
Gerrit-Change-Id: I6abae2d811311e340f3756d6084c461faff1b3dc
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] (bug 59970) show clear error message if httplib2 is not found - change (pywikibot/core)

2014-02-09 Thread jenkins-bot (Code Review)
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 valhall...@arctus.nl
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Xqt i...@gno.de
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits