Handle OSError during setup for System Monitor (#107396)
* Handle OSError during setup for System Monitor * Clean string copy * debug --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>pull/107459/head
parent
d19037a36b
commit
840089b8ac
|
@ -25,6 +25,11 @@ def get_all_disk_mounts() -> set[str]:
|
|||
"No permission for running user to access %s", part.mountpoint
|
||||
)
|
||||
continue
|
||||
except OSError as err:
|
||||
_LOGGER.debug(
|
||||
"Mountpoint %s was excluded because of: %s", part.mountpoint, err
|
||||
)
|
||||
continue
|
||||
if usage.total > 0 and part.device != "":
|
||||
disks.add(part.mountpoint)
|
||||
_LOGGER.debug("Adding disks: %s", ", ".join(disks))
|
||||
|
|
Loading…
Reference in New Issue