Mercurial > hg
diff mercurial/policy.py @ 48938:f98da1349212
policy: remove Python 2.7 compatibility code
Differential Revision: https://phab.mercurial-scm.org/D12344
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Feb 2022 12:36:04 -0700 |
parents | 6000f5b25c9b |
children | 3eac92509484 |
line wrap: on
line diff
--- a/mercurial/policy.py Mon Feb 21 12:35:29 2022 -0700 +++ b/mercurial/policy.py Mon Feb 21 12:36:04 2022 -0700 @@ -53,11 +53,8 @@ policy = b'cffi' # Environment variable can always force settings. -if sys.version_info[0] >= 3: - if 'HGMODULEPOLICY' in os.environ: - policy = os.environ['HGMODULEPOLICY'].encode('utf-8') -else: - policy = os.environ.get('HGMODULEPOLICY', policy) +if 'HGMODULEPOLICY' in os.environ: + policy = os.environ['HGMODULEPOLICY'].encode('utf-8') def _importfrom(pkgname, modname):