mercurial/hgweb/server.py
changeset 46907 ffd3e823a7e5
parent 46819 d4ba4d51f85f
child 47194 acd84c434896
--- a/mercurial/hgweb/server.py	Sun Apr 11 23:54:35 2021 +0200
+++ b/mercurial/hgweb/server.py	Mon Apr 12 03:01:04 2021 +0200
@@ -28,6 +28,9 @@
     pycompat,
     util,
 )
+from ..utils import (
+    urlutil,
+)
 
 httpservermod = util.httpserver
 socketserver = util.socketserver
@@ -431,7 +434,7 @@
         sys.setdefaultencoding(oldenc)
 
     address = ui.config(b'web', b'address')
-    port = util.getport(ui.config(b'web', b'port'))
+    port = urlutil.getport(ui.config(b'web', b'port'))
     try:
         return cls(ui, app, (address, port), handler)
     except socket.error as inst: