Mercurial > public > mercurial-scm > hg
diff mercurial/byterange.py @ 34466:1232f7fa00c3
cleanup: use urllibcompat for renamed methods on urllib request objects
Differential Revision: https://phab.mercurial-scm.org/D891
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 01 Oct 2017 12:14:21 -0400 |
parents | 635553ca6eb9 |
children | 6f62a1c3e11d |
line wrap: on
line diff
--- a/mercurial/byterange.py Sun Oct 01 10:45:03 2017 -0400 +++ b/mercurial/byterange.py Sun Oct 01 12:14:21 2017 -0400 @@ -28,6 +28,7 @@ import stat from . import ( + urllibcompat, util, ) @@ -214,8 +215,8 @@ server would. """ def open_local_file(self, req): - host = req.get_host() - file = req.get_selector() + host = urllibcompat.gethost(req) + file = urllibcompat.getselector(req) localfile = urlreq.url2pathname(file) stats = os.stat(localfile) size = stats[stat.ST_SIZE] @@ -252,7 +253,7 @@ class FTPRangeHandler(urlreq.ftphandler): def ftp_open(self, req): - host = req.get_host() + host = urllibcompat.gethost(req) if not host: raise IOError('ftp error', 'no host given') host, port = splitport(host)