Merge pull request #2721 from nicolargo/2719-openbsd-crash-on-start-without-a-swap-filepartition

OpenBSD crash on start without a swap file/partition #2719
This commit is contained in:
Nicolas Hennion 2024-04-08 11:57:53 +02:00 committed by GitHub
commit de9f40afc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)