From 693cd8e20d96b36d15942289985ae990664670d9 Mon Sep 17 00:00:00 2001 From: Nicolas Hennion Date: Mon, 8 Apr 2024 09:56:49 +0000 Subject: OpenBSD crash on start without a swap file/partition #2719 --- glances/plugins/memswap/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glances/plugins/memswap/__init__.py b/glances/plugins/memswap/__init__.py index 13cc88e1..8f98a9e3 100644 --- a/glances/plugins/memswap/__init__.py +++ b/glances/plugins/memswap/__init__.py @@ -79,8 +79,9 @@ class PluginModel(GlancesPluginModel): # Grab SWAP using the psutil swap_memory method try: sm_stats = psutil.swap_memory() - except RuntimeError: + except (OSError, RuntimeError): # Crash on startup on Illumos when no swap is configured #1767 + # OpenBSD crash on start without a swap file/partition #2719 pass else: # Get all the swap stats (copy/paste of the psutil documentation) -- cgit v1.2.3