diff --git a/web/config.py b/web/config.py index df9a7f7fa..cc934c254 100644 --- a/web/config.py +++ b/web/config.py @@ -364,6 +364,11 @@ COOKIE_DEFAULT_DOMAIN = None SESSION_COOKIE_DOMAIN = None SESSION_COOKIE_SAMESITE = 'Lax' +########################################################################## +# SSH Tunneling supports only for Python 2.7 and 3.4+ +########################################################################## +SUPPORT_SSH_TUNNEL = True + ########################################################################## # Local config settings ########################################################################## @@ -380,12 +385,10 @@ try: except ImportError: pass -########################################################################## -# SSH Tunneling supports only for Python 2.7 and 3.4+ -########################################################################## -SUPPORT_SSH_TUNNEL = False -if ( - (sys.version_info[0] == 2 and sys.version_info[1] >= 7) or - (sys.version_info[0] == 3 and sys.version_info[1] >= 4) +# SUPPORT_SSH_TUNNEL can be override in local config file and if that +# setting is False in local config then we should not check the Python version. +if (SUPPORT_SSH_TUNNEL is True and + ((sys.version_info[0] == 2 and sys.version_info[1] < 7) or + (sys.version_info[0] == 3 and sys.version_info[1] < 4)) ): - SUPPORT_SSH_TUNNEL = True + SUPPORT_SSH_TUNNEL = False