From 114823f59a97bd5f312e51a3620d4d209f74742e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 25 Aug 2025 11:28:15 +0200 Subject: [PATCH] skyplot: improve program exit --- utils/skyplot/skyplot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/skyplot/skyplot.py b/utils/skyplot/skyplot.py index e9ff4a8a2..74af1333a 100755 --- a/utils/skyplot/skyplot.py +++ b/utils/skyplot/skyplot.py @@ -875,7 +875,11 @@ def plot_satellite_tracks(satellites, obs_lat, obs_lon, obs_alt, plt.savefig(output_name, format=output_format, bbox_inches='tight') print(f"Image saved as {output_name}") if show_plot: - plt.show() + try: + plt.show() + except KeyboardInterrupt: + print("\nExecution interrupted by the user. Exiting.") + plt.close() else: plt.close()