1.2.0 release to pypi

This commit is contained in:
Kevin Hester
2021-03-03 11:21:37 +08:00
parent 3b8136d769
commit 171c79b414
11 changed files with 2848 additions and 1803 deletions

View File

@@ -34,6 +34,18 @@ import serial.tools.list_ports
blacklistVids = dict.fromkeys([0x1366])
def fixme(message):
raise Exception(f"FIXME: {message}")
def catchAndIgnore(reason, closure):
"""Call a closure but if it throws an excpetion print it and continue"""
try:
closure()
except BaseException as ex:
logging.error(f"Exception thrown in {reason}: {ex}")
def findPorts():
"""Find all ports that might have meshtastic devices
@@ -61,6 +73,23 @@ class dotdict(dict):
<section>
<h2 class="section-title" id="header-functions">Functions</h2>
<dl>
<dt id="meshtastic.util.catchAndIgnore"><code class="name flex">
<span>def <span class="ident">catchAndIgnore</span></span>(<span>reason, closure)</span>
</code></dt>
<dd>
<div class="desc"><p>Call a closure but if it throws an excpetion print it and continue</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def catchAndIgnore(reason, closure):
&#34;&#34;&#34;Call a closure but if it throws an excpetion print it and continue&#34;&#34;&#34;
try:
closure()
except BaseException as ex:
logging.error(f&#34;Exception thrown in {reason}: {ex}&#34;)</code></pre>
</details>
</dd>
<dt id="meshtastic.util.findPorts"><code class="name flex">
<span>def <span class="ident">findPorts</span></span>(<span>)</span>
</code></dt>
@@ -85,6 +114,19 @@ class dotdict(dict):
return l</code></pre>
</details>
</dd>
<dt id="meshtastic.util.fixme"><code class="name flex">
<span>def <span class="ident">fixme</span></span>(<span>message)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def fixme(message):
raise Exception(f&#34;FIXME: {message}&#34;)</code></pre>
</details>
</dd>
</dl>
</section>
<section>
@@ -127,7 +169,9 @@ class dotdict(dict):
</li>
<li><h3><a href="#header-functions">Functions</a></h3>
<ul class="">
<li><code><a title="meshtastic.util.catchAndIgnore" href="#meshtastic.util.catchAndIgnore">catchAndIgnore</a></code></li>
<li><code><a title="meshtastic.util.findPorts" href="#meshtastic.util.findPorts">findPorts</a></code></li>
<li><code><a title="meshtastic.util.fixme" href="#meshtastic.util.fixme">fixme</a></code></li>
</ul>
</li>
<li><h3><a href="#header-classes">Classes</a></h3>