httppeer: alias url as urlmod
authorGregory Szorc <gregory.szorc@gmail.com>
Wed, 07 Mar 2018 19:57:50 -0800
changeset 36965 43815d87c6aa
parent 36964 644a02f6b34f
child 36966 66651ec259ea
httppeer: alias url as urlmod "url" is a common variable name. We do this aliasing elsewhere to avoid shadowing. Differential Revision: https://phab.mercurial-scm.org/D2724
mercurial/httppeer.py
--- a/mercurial/httppeer.py	Wed Mar 14 11:52:35 2018 -0700
+++ b/mercurial/httppeer.py	Wed Mar 07 19:57:50 2018 -0800
@@ -22,7 +22,7 @@
     httpconnection,
     pycompat,
     statichttprepo,
-    url,
+    url as urlmod,
     util,
     wireproto,
 )
@@ -150,7 +150,7 @@
         self._ui = ui
         ui.debug('using %s\n' % self._url)
 
-        self._urlopener = url.opener(ui, authinfo)
+        self._urlopener = urlmod.opener(ui, authinfo)
         self._requestbuilder = urlreq.request
 
     def __del__(self):
@@ -486,7 +486,7 @@
     if create:
         raise error.Abort(_('cannot create new http repository'))
     try:
-        if path.startswith('https:') and not url.has_https:
+        if path.startswith('https:') and not urlmod.has_https:
             raise error.Abort(_('Python support for SSL and HTTPS '
                                 'is not installed'))