From 7b525360ece5b59072d6af0cf59f9508b595185b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 23 Sep 2024 16:22:05 -0400 Subject: [PATCH] fix: silence warning if TRACE is not specified --- bin/parse-ssh-host | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/parse-ssh-host b/bin/parse-ssh-host index 8d1386a..1a9f932 100755 --- a/bin/parse-ssh-host +++ b/bin/parse-ssh-host @@ -13,7 +13,8 @@ def is_ipv6(ip): try: return isinstance(ipaddress.ip_address(ip), ipaddress.IPv6Address) except ValueError: - print(f"Invalid IP address: {ip}", file=sys.stderr) + if os.getenv("TRACE") != "': + print(f"Invalid IP address: {ip}", file=sys.stderr) return False