mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-15 02:30:29 +08:00
fixed deprecation warning
This commit is contained in:
parent
a67c20be29
commit
0efd93d496
@ -112,7 +112,7 @@ def valid_ssl_ciphers(arg: Any) -> str:
|
|||||||
name = "SSL ciphers"
|
name = "SSL ciphers"
|
||||||
arg = valid_stripped_string_not_empty(arg, name)
|
arg = valid_stripped_string_not_empty(arg, name)
|
||||||
try:
|
try:
|
||||||
ssl.SSLContext().set_ciphers(arg)
|
ssl.SSLContext(ssl.PROTOCOL_TLS).set_ciphers(arg)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
raise ValidatorError(f"The argument {arg!r} is not a valid {name}: {err}")
|
raise ValidatorError(f"The argument {arg!r} is not a valid {name}: {err}")
|
||||||
return arg
|
return arg
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user