Skip to content

Commit 9479fb2

Browse files
authored
Merge pull request #942 from ianmcorvidae/document-port
Better document how to specify a port when using TCP connection
2 parents 7fc69e9 + 990ecc2 commit 9479fb2

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

meshtastic/__main__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1621,10 +1621,12 @@ def addConnectionArgs(parser: argparse.ArgumentParser) -> argparse.ArgumentParse
16211621
"--host",
16221622
"--tcp",
16231623
"-t",
1624-
help="Connect to a device using TCP, optionally passing hostname or IP address to use. (defaults to '%(const)s')",
1624+
help=("Connect to a device using TCP, optionally passing hostname or IP address to use. (defaults to '%(const)s'). "
1625+
"A port number may be specified as well, e.g. meshtastic.local:4404. The default port is 4403."),
16251626
nargs="?",
16261627
default=None,
16271628
const="localhost",
1629+
metavar="HOST[:PORT]",
16281630
)
16291631

16301632
group.add_argument(

meshtastic/tests/test_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3157,7 +3157,7 @@ def test_main_ota_update_file_not_found(capsys):
31573157

31583158
assert pytest_wrapped_e.type == SystemExit
31593159
assert pytest_wrapped_e.value.code == 1
3160-
out, err = capsys.readouterr()
3160+
out, _ = capsys.readouterr()
31613161
assert "OTA firmware file not found" in out
31623162
assert "/nonexistent/firmware.bin" in out
31633163

0 commit comments

Comments
 (0)