summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Christophe <huygens@berthon.eu>2014-12-15 15:52:33 +0100
committerAlessio Sergi <al3hex@gmail.com>2014-12-15 16:30:49 +0100
commit4f7773e3a8c5846e84e700ecd7aa29c6eed3f0ba (patch)
treefbdb95b22f2abe244cd15331cd1a1f2dbeb38ae3
parentd17def69b40a347787b87b16f7f7cd2e4d4e7516 (diff)
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.
-rw-r--r--glances/plugins/glances_system.py2
1 files changed, 1 insertions, 1 deletions
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: