From f44ea4a0582ae775a96aa94fc2827c5972c4aaf9 Mon Sep 17 00:00:00 2001 From: Nicolas Jouanin Date: Wed, 8 Jul 2015 22:30:42 +0200 Subject: [PATCH] Fix typo --- hbmqtt/mqtt/pingreq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbmqtt/mqtt/pingreq.py b/hbmqtt/mqtt/pingreq.py index f886ec7..31ae9c9 100644 --- a/hbmqtt/mqtt/pingreq.py +++ b/hbmqtt/mqtt/pingreq.py @@ -12,7 +12,7 @@ class PingReqPacket(MQTTPacket): if fixed is None: header = MQTTFixedHeader(PacketType.PINGREQ, 0x00) else: - if fixed.packet_type is not PacketType.DISCONNECT: + if fixed.packet_type is not PacketType.PINGREQ: raise HBMQTTException("Invalid fixed packet type %s for PingReqPacket init" % fixed.packet_type) header = fixed super().__init__(header)