From a513666e037777201dda3a4b143ae2201a485a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Thu, 13 Jul 2023 10:54:30 +0200 Subject: [PATCH] Change: Make errors more visible in the terminal Don't let errors look like normal terminal output. Instead highlight the error. --- greenbone/feed/sync/main.py | 2 +- tests/test_main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/greenbone/feed/sync/main.py b/greenbone/feed/sync/main.py index 3ba0e94..c10b76b 100644 --- a/greenbone/feed/sync/main.py +++ b/greenbone/feed/sync/main.py @@ -234,7 +234,7 @@ def main() -> NoReturn: try: sys.exit(asyncio.run(feed_sync(console, error_console))) except GreenboneFeedSyncError as e: - error_console.print(str(e)) + error_console.print(f"[red]❌[/red]Error: {e}") sys.exit(1) except KeyboardInterrupt: sys.exit(1) diff --git a/tests/test_main.py b/tests/test_main.py index 35faa5b..1189075 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -449,7 +449,7 @@ def test_sync_nvts_error( call( f"Releasing lock on {temp_dir}/openvas/feed-update.lock" ), - call("An error"), + call("[red]❌[/red]Error: An error"), ] )