storage: Adjust to changes in privileged errors

Tests:

- Edit auto-mounting to try mounting an already mounted device. In a VM, during
service startup, notice the warning about failure to auto-mount as device is
already mounted.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2024-03-19 11:46:34 -04:00
1 parent cf4f29e848
commit 969d9311ab
1 file changed
+1 -1
+1 -1
View File
@@ -196,7 +196,7 @@ def _mount(object_path):
try:
privileged.mount(block_device.preferred_device, _log_error=False)
except Exception as exception:
stderr = exception.args[3].decode()
stderr = getattr(exception, 'stderr', b'').decode()
if 'GDBus.Error' not in stderr:
raise