Mercurial > hg
diff hgext/largefiles/proto.py @ 28883:032c4c2f802a
pycompat: switch to util.urlreq/util.urlerr for py3 compat
author | timeless <timeless@mozdev.org> |
---|---|
date | Wed, 06 Apr 2016 23:22:12 +0000 |
parents | 33bd95443e7f |
children | 29139be0ccc7 |
line wrap: on
line diff
--- a/hgext/largefiles/proto.py Thu Apr 07 00:05:48 2016 +0000 +++ b/hgext/largefiles/proto.py Wed Apr 06 23:22:12 2016 +0000 @@ -4,12 +4,14 @@ # GNU General Public License version 2 or any later version. import os -import urllib2 import re from mercurial import error, httppeer, util, wireproto from mercurial.i18n import _ +urlerr = util.urlerr +urlreq = util.urlreq + import lfutil LARGEFILES_REQUIRED_MSG = ('\nThis repository uses the largefiles extension.' @@ -140,7 +142,7 @@ yield result, f try: yield int(f.value) - except (ValueError, urllib2.HTTPError): + except (ValueError, urlerr.httperror): # If the server returns anything but an integer followed by a # newline, newline, it's not speaking our language; if we get # an HTTP error, we can't be sure the largefile is present;