From 6daa75280036217b485c9ea910de15af24add27b Mon Sep 17 00:00:00 2001 From: Nico Date: Sun, 1 Nov 2015 14:22:31 +0100 Subject: [PATCH] Add message type to exception --- hbmqtt/mqtt/packet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbmqtt/mqtt/packet.py b/hbmqtt/mqtt/packet.py index c4f78a8..6601a4d 100644 --- a/hbmqtt/mqtt/packet.py +++ b/hbmqtt/mqtt/packet.py @@ -89,7 +89,7 @@ class MQTTFixedHeader: else: multiplier *= 128 if multiplier > 128 * 128 * 128: - raise MQTTException("Invalid remaining length bytes:%s" % bytes_to_hex_str(buffer)) + raise MQTTException("Invalid remaining length bytes:%s, packet_type=%d" % (bytes_to_hex_str(buffer), msg_type)) return value try: