changeset 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 32ac127c999f
children 37537a4d2695
files mercurial/policy.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
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):