From 969d9311abf4cb35784dc3a048953425fa575446 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 18 Mar 2024 14:39:08 -0700 Subject: [PATCH] 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 Reviewed-by: James Valleroy --- plinth/modules/storage/udisks2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/modules/storage/udisks2.py b/plinth/modules/storage/udisks2.py index 7779f35e6..0a19008e9 100644 --- a/plinth/modules/storage/udisks2.py +++ b/plinth/modules/storage/udisks2.py @@ -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