Fixed MQTT over SSL default version spec in case the parameter is not a string
This commit is contained in:
parent
314c01ef97
commit
452533db17
1 changed files with 6 additions and 1 deletions
|
@ -82,7 +82,12 @@ class MqttPlugin(Plugin):
|
|||
if not version:
|
||||
return None
|
||||
|
||||
version = version.lower()
|
||||
if type(version) == type(ssl.PROTOCOL_TLS):
|
||||
return version
|
||||
|
||||
if isinstance(version, str):
|
||||
version = version.lower()
|
||||
|
||||
if version == 'tls':
|
||||
return ssl.PROTOCOL_TLS
|
||||
if version == 'tlsv1':
|
||||
|
|
Loading…
Reference in a new issue