From 9a323d2404b8fe7620aaef3e83d15b5168156603 Mon Sep 17 00:00:00 2001 From: Catherine Date: Wed, 27 Sep 2023 17:44:48 +0000 Subject: [PATCH] applet.interface.uart: default to `tty` operation. --- software/glasgow/applet/interface/uart/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/software/glasgow/applet/interface/uart/__init__.py b/software/glasgow/applet/interface/uart/__init__.py index 309a4efce..3dda1084b 100644 --- a/software/glasgow/applet/interface/uart/__init__.py +++ b/software/glasgow/applet/interface/uart/__init__.py @@ -243,7 +243,7 @@ async def run(self, device, args): @classmethod def add_interact_arguments(cls, parser): - p_operation = parser.add_subparsers(dest="operation", metavar="OPERATION", required=True) + p_operation = parser.add_subparsers(dest="operation", metavar="OPERATION") p_tty = p_operation.add_parser( "tty", help="connect UART to stdin/stdout") @@ -378,6 +378,8 @@ async def forward_in(): async def interact(self, device, args, uart): asyncio.create_task(self._monitor_errors(device)) + if args.operation is None: + await self._interact_tty(uart, stream=False) if args.operation == "tty": await self._interact_tty(uart, args.stream) if args.operation == "pty":