Patchwork D2139: py3: pass system string to socket.getservbyname

login
register
mail settings
Submitter phabricator
Date Feb. 12, 2018, 1:40 a.m.
Message ID <5691b47167f1e401b740a96a49e0181d@localhost.localdomain>
Download mbox | patch
Permalink /patch/27610/
State Not Applicable
Headers show

Comments

phabricator - Feb. 12, 2018, 1:40 a.m.
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




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

Patch

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)