mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
storage: Don't log exception of disk space check fails
When running inside a container, it is not possible to retrieve information about the disk that is mounted on '/'. Ignore errors in such cases. Tests performed: - Inside a container, start the service using freedombox-devel. Every 3 minutes a check for disk space will be done in developer mode. If UDisks is being used as source of information, the free space check will fail with an error logged. - With the changes, the error is not shown. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Tested-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
29813696c6
commit
64ff37e83f
@ -290,9 +290,7 @@ def warn_about_low_disk_space(request):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
root_info = get_disk_info('/')
|
root_info = get_disk_info('/')
|
||||||
except PlinthError as exception:
|
except PlinthError:
|
||||||
logger.exception('Error getting information about root partition: %s',
|
|
||||||
exception)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
show = False
|
show = False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user