diff options
author | Jean-Christophe <huygens@berthon.eu> | 2014-12-15 15:52:33 +0100 |
---|---|---|
committer | Alessio Sergi <al3hex@gmail.com> | 2014-12-15 16:30:49 +0100 |
commit | 4f7773e3a8c5846e84e700ecd7aa29c6eed3f0ba (patch) | |
tree | fbdb95b22f2abe244cd15331cd1a1f2dbeb38ae3 | |
parent | d17def69b40a347787b87b16f7f7cd2e4d4e7516 (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.py | 2 |
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: |