diff --git a/docs/meshtastic/test.html b/docs/meshtastic/test.html
index 7d1f08a..ce9a9c1 100644
--- a/docs/meshtastic/test.html
+++ b/docs/meshtastic/test.html
@@ -59,7 +59,8 @@ def onReceive(packet, interface):
if p.decoded.portnum == "TEXT_MESSAGE_APP":
# We only care a about clear text packets
- receivedPackets.append(p)
+ if receivedPackets != None:
+ receivedPackets.append(p)
def onNode(node):
@@ -271,7 +272,8 @@ def testSimulator():
if p.decoded.portnum == "TEXT_MESSAGE_APP":
# We only care a about clear text packets
- receivedPackets.append(p)
+ if receivedPackets != None:
+ receivedPackets.append(p)
diff --git a/docs/meshtastic/util.html b/docs/meshtastic/util.html
index 40235ad..fcf689c 100644
--- a/docs/meshtastic/util.html
+++ b/docs/meshtastic/util.html
@@ -27,7 +27,7 @@
Expand source code
from collections import defaultdict
-import serial
+import serial, traceback
import serial.tools.list_ports
from queue import Queue
import threading, sys, time, logging
@@ -113,7 +113,8 @@ class DeferredExecution():
o()
except:
logging.error(
- f"Unexpected error in deferred execution {sys.exc_info()[0]}")
+ f"Unexpected error in deferred execution {sys.exc_info()[0]}")
+ print(traceback.format_exc())
@@ -226,7 +227,8 @@ class DeferredExecution():
o()
except:
logging.error(
- f"Unexpected error in deferred execution {sys.exc_info()[0]}")
+ f"Unexpected error in deferred execution {sys.exc_info()[0]}")
+ print(traceback.format_exc())
Methods
diff --git a/meshtastic/test.py b/meshtastic/test.py
index 2a0c662..28d6ed4 100644
--- a/meshtastic/test.py
+++ b/meshtastic/test.py
@@ -31,7 +31,8 @@ def onReceive(packet, interface):
if p.decoded.portnum == "TEXT_MESSAGE_APP":
# We only care a about clear text packets
- receivedPackets.append(p)
+ if receivedPackets != None:
+ receivedPackets.append(p)
def onNode(node):
diff --git a/meshtastic/util.py b/meshtastic/util.py
index 1ad43b1..4f27d30 100644
--- a/meshtastic/util.py
+++ b/meshtastic/util.py
@@ -1,6 +1,6 @@
from collections import defaultdict
-import serial
+import serial, traceback
import serial.tools.list_ports
from queue import Queue
import threading, sys, time, logging
@@ -87,3 +87,4 @@ class DeferredExecution():
except:
logging.error(
f"Unexpected error in deferred execution {sys.exc_info()[0]}")
+ print(traceback.format_exc())
diff --git a/setup.py b/setup.py
index f1110a8..b5ec913 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ with open("README.md", "r") as fh:
# This call to setup() does all the work
setup(
name="meshtastic",
- version="1.2.30",
+ version="1.2.31",
description="Python API & client shell for talking to Meshtastic devices",
long_description=long_description,
long_description_content_type="text/markdown",