mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-27 19:25:27 +03:00
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.
This commit is contained in:
parent
d17def69b4
commit
4f7773e3a8
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user