Compare commits

...

6 Commits

Author SHA1 Message Date
Ben Meadors
fe8ae6237e Merge pull request #469 from marek22k/improve-argument-handling
Improve argument handling
2024-01-04 20:30:36 -06:00
github-actions
7908fda1cf bump version 2023-12-17 17:43:05 +00:00
github-actions
fe9a367553 Update protobuf submodule 2023-12-17 17:41:45 +00:00
github-actions
79d7dcc199 bump version 2023-12-13 01:04:29 +00:00
Marek Küthe
b468a0c908 Tunnel: Check other arguments 2023-12-04 12:55:36 +00:00
Marek Küthe
de154e50ca Tunnel: Pass variable only if it has content.
Closes https://github.com/meshtastic/python/issues/468
2023-12-04 12:55:06 +00:00
4 changed files with 12 additions and 3 deletions

View File

@@ -771,7 +771,10 @@ def onConnected(interface):
if interface.noProto:
logging.warning(f"Not starting Tunnel - disabled by noProto")
else:
tunnel.Tunnel(interface, subnet=args.tunnel_net)
if args.tunnel_net:
tunnel.Tunnel(interface, subnet=args.tunnel_net)
else:
tunnel.Tunnel(interface)
if args.ack or (args.dest != BROADCAST_ADDR and waitForAckNak):
print(

View File

@@ -49,6 +49,12 @@ class Tunnel:
if not iface:
raise Exception("Tunnel() must have a interface")
if not subnet:
raise Exception("Tunnel() must have a subnet")
if not netmask:
raise Exception("Tunnel() must have a netmask")
self.iface = iface
self.subnetPrefix = subnet

View File

@@ -13,7 +13,7 @@ with open("README.md", "r") as fh:
# This call to setup() does all the work
setup(
name="meshtastic",
version="2.2.14",
version="2.2.16",
description="Python API & client shell for talking to Meshtastic devices",
long_description=long_description,
long_description_content_type="text/markdown",