Skip to content

Commit 05aa0ef

Browse files
martinpittallisonkarlitskaya
authored andcommitted
examples: Add --port option to simple.py
1 parent 0e41a67 commit 05aa0ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/simple.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ async def do_askpass(self, messages: str, prompt: str, hint: str) -> str | None:
3636

3737
async def run() -> None:
3838
parser = argparse.ArgumentParser()
39+
parser.add_argument('-p', '--port', type=int)
3940
parser.add_argument('host')
4041
parser.add_argument('cmd', nargs='+')
4142
args = parser.parse_args()
4243

4344
session = ferny.Session()
44-
await session.connect(args.host, interaction_responder=PromptResponder())
45+
await session.connect(args.host, port=args.port, interaction_responder=PromptResponder())
4546
subprocess.run(session.wrap_subprocess_args(args.cmd), check=True)
4647
await session.disconnect()
4748

0 commit comments

Comments
 (0)