diff options
author | Nicolas Hennion <nicolashennion@gmail.com> | 2024-04-08 09:56:49 +0000 |
---|---|---|
committer | Nicolas Hennion <nicolashennion@gmail.com> | 2024-04-08 09:56:49 +0000 |
commit | 693cd8e20d96b36d15942289985ae990664670d9 (patch) | |
tree | c66794e4b1240f049d96da2b978eeb2506a5b9e4 | |
parent | c62292444b4de96fbaeddb771a069a0d117ae59d (diff) |
OpenBSD crash on start without a swap file/partition #27192719-openbsd-crash-on-start-without-a-swap-filepartition
-rw-r--r-- | glances/plugins/memswap/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
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) |