John Vandenberg has uploaded a new change for review.

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

Change subject: Bug 66063: raise urllib exception
......................................................................

Bug 66063: raise urllib exception

The first network activity by pywiki is fetching the git repo version.
If there are network problems, the exception should not be caught and
hidden behind a new ParseError without a useful backtrace.

Change-Id: I6c2d19a94bcf997f51364efce804ec494274043e
---
M pywikibot/version.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/06/137006/1

diff --git a/pywikibot/version.py b/pywikibot/version.py
index 6d0d30d..deff0ef 100644
--- a/pywikibot/version.py
+++ b/pywikibot/version.py
@@ -177,8 +177,8 @@
     """ Retrieve revision number of framework online repository's svnroot """
     url = repo or 'https://git.wikimedia.org/feed/pywikibot/core'
     hsh = None
+    buf = urllib.urlopen(url).readlines()
     try:
-        buf = urllib.urlopen(url).readlines()
         hsh = buf[13].split('/')[5][:-1]
     except:
         raise ParseError

-- 
To view, visit https://gerrit.wikimedia.org/r/137006
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c2d19a94bcf997f51364efce804ec494274043e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jay...@gmail.com>

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

Reply via email to