From 415375e3e2f5cd5d328e3534f93cf9c06e4f80e9 Mon Sep 17 00:00:00 2001 From: Michael Baird Date: Wed, 3 Apr 2019 11:13:30 +1300 Subject: [PATCH] 0 is an allowed id --- chewie/message_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chewie/message_parser.py b/chewie/message_parser.py index c2cb4121..2ccbd434 100644 --- a/chewie/message_parser.py +++ b/chewie/message_parser.py @@ -21,7 +21,7 @@ def __init__(self, src_mac, message_id): def __str__(self): _id = self.message_id - if not _id: + if _id is None: _id = -1 return "'%s': src_mac: '%s', id: '%d'" % (self.__class__.__name__, self.src_mac, _id)