From de154e50ca89191a6882e8c12e1da0e0e4ed3271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20K=C3=BCthe?= Date: Mon, 4 Dec 2023 12:55:06 +0000 Subject: [PATCH] Tunnel: Pass variable only if it has content. Closes https://github.com/meshtastic/python/issues/468 --- meshtastic/__main__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index 1d0c248..3d6616d 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -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(