mercurial/pycompat.py
changeset 43117 8ff1ecfadcd1
parent 43106 d783f945a701
child 43380 579672b347d2
child 43432 8d5489b048b7
equal deleted inserted replaced
43116:defabf63e969 43117:8ff1ecfadcd1
   359     getattr = getattr
   359     getattr = getattr
   360     hasattr = hasattr
   360     hasattr = hasattr
   361     setattr = setattr
   361     setattr = setattr
   362 
   362 
   363     # this can't be parsed on Python 3
   363     # this can't be parsed on Python 3
   364     exec(b'def raisewithtb(exc, tb):\n' b'    raise exc, None, tb\n')
   364     exec(b'def raisewithtb(exc, tb):\n    raise exc, None, tb\n')
   365 
   365 
   366     def fsencode(filename):
   366     def fsencode(filename):
   367         """
   367         """
   368         Partial backport from os.py in Python 3, which only accepts bytes.
   368         Partial backport from os.py in Python 3, which only accepts bytes.
   369         In Python 2, our paths should only ever be bytes, a unicode path
   369         In Python 2, our paths should only ever be bytes, a unicode path