From 28bee047a97a434b8b318c5d0d2ae5a69f853499 Mon Sep 17 00:00:00 2001 From: Cyril Jouve Date: Fri, 28 Aug 2020 19:02:14 +0200 Subject: [PATCH 5/7] Renames xrange() to range() --- web/pgadmin/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/web/pgadmin/__init__.py b/web/pgadmin/__init__.py index 4bb58fcd1..08ae0ca48 100644 --- a/web/pgadmin/__init__.py +++ b/web/pgadmin/__init__.py @@ -40,10 +40,7 @@ from pgadmin.utils.ajax import internal_server_error from pgadmin.utils.csrf import pgCSRFProtect from pgadmin import authenticate -# If script is running under python3, it will not have the xrange function -# defined winreg = None -xrange = range if os.name == 'nt': import winreg @@ -506,7 +503,7 @@ def create_app(app_name=None): "SOFTWARE\\" + server_type + "\\Services", 0, winreg.KEY_READ | arch_key ) - for i in xrange(0, winreg.QueryInfoKey(root_key)[0]): + for i in range(0, winreg.QueryInfoKey(root_key)[0]): inst_id = winreg.EnumKey(root_key, i) inst_key = winreg.OpenKey(root_key, inst_id) -- 2.28.0