From 6bc5f5e3056d953b42d51aa3cfdd1c5b65ba208c Mon Sep 17 00:00:00 2001 From: David Andrzejewski Date: Tue, 18 Feb 2025 21:15:31 -0500 Subject: [PATCH] Fix count vs len on a list (https://github.com/meshtastic/python/pull/736#discussion_r1960099918) --- meshtastic/mesh_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/mesh_interface.py b/meshtastic/mesh_interface.py index 8ccb0da..e006493 100644 --- a/meshtastic/mesh_interface.py +++ b/meshtastic/mesh_interface.py @@ -292,7 +292,7 @@ class MeshInterface: # pylint: disable=R0902 return None return value - if showFields is None or showFields.count == 0: + if showFields is None or len(showFields) == 0: # The default set of fields to show (e.g., the status quo) showFields = ["N", "user.longName", "user.id", "user.shortName", "user.hwModel", "user.publicKey", "user.role", "position.latitude", "position.longitude", "position.altitude",