diff mercurial/util.py @ 30054:8b89521a69ba

util: use string.hexdigits instead of defining it ourselves This resolves some Python 3 weirdness.
author Augie Fackler <augie@google.com>
date Fri, 07 Oct 2016 08:58:23 -0400
parents dbcef8918bbd
children 81d38478fced
line wrap: on
line diff
--- a/mercurial/util.py	Fri Oct 07 08:01:16 2016 -0400
+++ b/mercurial/util.py	Fri Oct 07 08:58:23 2016 -0400
@@ -28,6 +28,7 @@
 import shutil
 import signal
 import socket
+import string
 import subprocess
 import sys
 import tempfile
@@ -2297,9 +2298,8 @@
     """
     return _booleans.get(s.lower(), None)
 
-_hexdig = '0123456789ABCDEFabcdef'
 _hextochr = dict((a + b, chr(int(a + b, 16)))
-                 for a in _hexdig for b in _hexdig)
+                 for a in string.hexdigits for b in string.hexdigits)
 
 def _urlunquote(s):
     """Decode HTTP/HTML % encoding.