From 4f7773e3a8c5846e84e700ecd7aa29c6eed3f0ba Mon Sep 17 00:00:00 2001 From: Jean-Christophe Date: Mon, 15 Dec 2014 15:52:33 +0100 Subject: Handle IOError exception if no /etc/os-release On Synology DSM OS (Linux base), python throws an IOError when open does not find a file. Previously only OSError was handled, now it handles both the OSError and IOError. --- glances/plugins/glances_system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glances/plugins/glances_system.py b/glances/plugins/glances_system.py index e2ad6290..1d170eba 100644 --- a/glances/plugins/glances_system.py +++ b/glances/plugins/glances_system.py @@ -80,7 +80,7 @@ class Plugin(GlancesPlugin): for key in keys: if line.startswith(key): ashtray[key] = line.strip().split('=')[1][1:-1] - except OSError: + except (OSError, IOError): return pretty_name if ashtray: -- cgit v1.2.3