Bladeren bron

HUE-9106 [core] Compare Python version by tuple and not string

If not in Python 3:
TypeError: '>=' not supported between instances of 'str' and 'tuple'
Romain 6 jaren geleden
bovenliggende
commit
fae76907ce
1 gewijzigde bestanden met toevoegingen van 5 en 2 verwijderingen
  1. 5 2
      desktop/core/src/desktop/conf.py

+ 5 - 2
desktop/core/src/desktop/conf.py

@@ -252,13 +252,16 @@ SSL_CIPHER_LIST = Config(
   ]))
   ]))
 
 
 def has_ssl_no_renegotiation():
 def has_ssl_no_renegotiation():
-  return sys.version >= (3, 7)
+  return sys.version_info[:2] >= (3, 7)
 
 
 SSL_NO_RENEGOTIATION = Config(
 SSL_NO_RENEGOTIATION = Config(
   key="ssl_no_renegotiation",
   key="ssl_no_renegotiation",
   type=coerce_bool,
   type=coerce_bool,
   default=has_ssl_no_renegotiation(),
   default=has_ssl_no_renegotiation(),
-  help=_("Disable all renegotiation in TLSv1.2 and earlier. Do not send HelloRequest messages, and ignore renegotiation requests via ClientHello. This option is only available with OpenSSL 1.1.0h and later and python 3.7"))
+  help=_(
+    "Disable all renegotiation in TLSv1.2 and earlier. Do not send HelloRequest messages, and ignore renegotiation requests"
+    " via ClientHello. This option is only available with OpenSSL 1.1.0h and later and python 3.7")
+  )
 
 
 SSL_PASSWORD = Config(
 SSL_PASSWORD = Config(
   key="ssl_password",
   key="ssl_password",