From 9fa61351d03fcfd98c9378e2d1255020f78f6506 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Mon, 26 May 2025 20:45:36 +0100 Subject: [PATCH] return 0 for empty lists and write to stdout --- obsws_cli/input.py | 4 ++-- obsws_cli/sceneitem.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/obsws_cli/input.py b/obsws_cli/input.py index fa884bf..4a5febb 100644 --- a/obsws_cli/input.py +++ b/obsws_cli/input.py @@ -48,8 +48,8 @@ def list( ] if not inputs: - err_console.print('No inputs found.') - raise typer.Exit(1) + out_console.print('No inputs found.') + return table = Table(title='Inputs', padding=(0, 2)) for column in ('Input Name', 'Kind'): diff --git a/obsws_cli/sceneitem.py b/obsws_cli/sceneitem.py index e8ed5d1..37dda36 100644 --- a/obsws_cli/sceneitem.py +++ b/obsws_cli/sceneitem.py @@ -39,8 +39,8 @@ def list( items = [item.get('sourceName') for item in resp.scene_items] if not items: - err_console.print(f"No items found in scene '{scene_name}'.") - raise typer.Exit(1) + out_console.print(f"No items found in scene '{scene_name}'.") + return table = Table(title=f'Items in Scene: {scene_name}', padding=(0, 2)) table.add_column('Item Name', justify='left', style='cyan')