Tunnel: Pass variable only if it has content.

Closes https://github.com/meshtastic/python/issues/468
This commit is contained in:
Marek Küthe
2023-12-04 12:55:06 +00:00
parent 70bb58b8ce
commit de154e50ca

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(