Skip to content

Commit

Permalink
use aiomqtt.ProtocolVersion for Client
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjiU committed May 8, 2024
1 parent b7cdd21 commit f004d02
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mqtt_io/mqtt/aiomqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from functools import wraps
from typing import Any, Callable, List, Optional, Tuple, TypeVar, cast

from aiomqtt.client import Client, MqttError, Will # type: ignore
from aiomqtt.client import Client, MqttError, Will, ProtocolVersion # type: ignore
from paho.mqtt import client as paho # type: ignore

from . import (
Expand Down Expand Up @@ -72,9 +72,9 @@ def __init__(self, options: MQTTClientOptions):
"""
super().__init__(options)
protocol_map = {
MQTTProtocol.V31: paho.MQTTv31,
MQTTProtocol.V311: paho.MQTTv311,
MQTTProtocol.V5: paho.MQTTv5,
MQTTProtocol.V31: ProtocolVersion.V31,
MQTTProtocol.V311: ProtocolVersion.V311,
MQTTProtocol.V5: ProtocolVersion.V5,
}
will = None
if options.will is not None:
Expand Down

0 comments on commit f004d02

Please sign in to comment.