diff --git a/insteon_mqtt/cmd_line/util.py b/insteon_mqtt/cmd_line/util.py index 59ac697d..00a84eaa 100644 --- a/insteon_mqtt/cmd_line/util.py +++ b/insteon_mqtt/cmd_line/util.py @@ -85,6 +85,7 @@ def send(config, topic, payload, quiet=False): encryption = config["mqtt"].get('encryption', {}) if encryption is None: encryption = {} + addl_tls_kwargs = {} ca_cert = encryption.get('ca_cert', None) enable_tls = encryption.get('enable', None) if (ca_cert is not None and ca_cert != "") or enable_tls: @@ -103,7 +104,6 @@ def send(config, topic, payload, quiet=False): # These require passing specific constants so we use a lookup # map for them. - addl_tls_kwargs = {} tls_ver = encryption.get('tls_version', 'tls') tls_version_const = TLS_VER_OPTIONS.get(tls_ver, None) if tls_version_const is not None: diff --git a/insteon_mqtt/network/Mqtt.py b/insteon_mqtt/network/Mqtt.py index 762ebf21..885ebab9 100644 --- a/insteon_mqtt/network/Mqtt.py +++ b/insteon_mqtt/network/Mqtt.py @@ -155,6 +155,7 @@ def load_config(self, config): encryption = config.get('encryption', {}) if encryption is None: encryption = {} + addl_tls_kwargs = {} ca_cert = encryption.get('ca_cert', None) enable_tls = encryption.get('enable', None) if (ca_cert is not None and ca_cert != "") or enable_tls: @@ -174,7 +175,6 @@ def load_config(self, config): # These require passing specific constants so we use a lookup # map for them. - addl_tls_kwargs = {} tls_ver = encryption.get('tls_version', 'tls') tls_version_const = self.TLS_VER_OPTIONS.get(tls_ver, None) if tls_version_const is not None: