mirror of
https://github.com/meshtastic/python.git
synced 2025-12-27 01:47:50 -05:00
1.2.31 fix minor test bug
This commit is contained in:
@@ -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)</code></pre>
|
||||
if receivedPackets != None:
|
||||
receivedPackets.append(p)</code></pre>
|
||||
</details>
|
||||
</dd>
|
||||
<dt id="meshtastic.test.openDebugLog"><code class="name flex">
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">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]}")</code></pre>
|
||||
f"Unexpected error in deferred execution {sys.exc_info()[0]}")
|
||||
print(traceback.format_exc())</code></pre>
|
||||
</details>
|
||||
</section>
|
||||
<section>
|
||||
@@ -226,7 +227,8 @@ class DeferredExecution():
|
||||
o()
|
||||
except:
|
||||
logging.error(
|
||||
f"Unexpected error in deferred execution {sys.exc_info()[0]}")</code></pre>
|
||||
f"Unexpected error in deferred execution {sys.exc_info()[0]}")
|
||||
print(traceback.format_exc())</code></pre>
|
||||
</details>
|
||||
<h3>Methods</h3>
|
||||
<dl>
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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())
|
||||
|
||||
2
setup.py
2
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",
|
||||
|
||||
Reference in New Issue
Block a user