D2139: py3: pass system string to socket.getservbyname

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Sun Feb 11 20:40:12 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG15c8c4ac5d9c: py3: pass system string to socket.getservbyname (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2139?vs=5424&id=5440

REVISION DETAIL
  https://phab.mercurial-scm.org/D2139

AFFECTED FILES
  mercurial/util.py

CHANGE DETAILS

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -2717,7 +2717,7 @@
         pass
 
     try:
-        return socket.getservbyname(port)
+        return socket.getservbyname(pycompat.sysstr(port))
     except socket.error:
         raise Abort(_("no port number associated with service '%s'") % port)
 



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list