Skip to content
Snippets Groups Projects
Commit 46b3ecfb authored by Gregory Szorc's avatar Gregory Szorc
Browse files

stringutil: remove Python 2 support code

Differential Revision: https://phab.mercurial-scm.org/D12314
parent 3681b4c5
No related branches found
No related tags found
1 merge request!168branching: merge default into stable
......@@ -964,6 +964,4 @@
def evalpythonliteral(s):
"""Evaluate a string containing a Python literal expression"""
# We could backport our tokenizer hack to rewrite '' to u'' if we want
if pycompat.ispy3:
return ast.literal_eval(s.decode('latin1'))
return ast.literal_eval(s)
return ast.literal_eval(s.decode('latin1'))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment