Better document how to specify a port when using TCP connection

Fixes #868

Also, fix a pylint complaint.
This commit is contained in:
Ian McEwen
2026-06-25 14:46:45 -07:00
parent 7fc69e957c
commit 990ecc2350
2 changed files with 4 additions and 2 deletions

View File

@@ -1621,10 +1621,12 @@ def addConnectionArgs(parser: argparse.ArgumentParser) -> argparse.ArgumentParse
"--host",
"--tcp",
"-t",
help="Connect to a device using TCP, optionally passing hostname or IP address to use. (defaults to '%(const)s')",
help=("Connect to a device using TCP, optionally passing hostname or IP address to use. (defaults to '%(const)s'). "
"A port number may be specified as well, e.g. meshtastic.local:4404. The default port is 4403."),
nargs="?",
default=None,
const="localhost",
metavar="HOST[:PORT]",
)
group.add_argument(

View File

@@ -3157,7 +3157,7 @@ def test_main_ota_update_file_not_found(capsys):
assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.value.code == 1
out, err = capsys.readouterr()
out, _ = capsys.readouterr()
assert "OTA firmware file not found" in out
assert "/nonexistent/firmware.bin" in out