From 13f8dbae22228e11f8f78bfcd9e57d9316bc31a0 Mon Sep 17 00:00:00 2001 From: mulhern Date: Wed, 10 Jun 2026 12:53:32 -0400 Subject: [PATCH 1/2] Revert "Only match org.freedesktop.zbus.Error for property setting" This reverts commit d5f3068056931ce483fb8e825992cea4b46084ec. --- src/stratis_cli/_error_reporting.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/stratis_cli/_error_reporting.py b/src/stratis_cli/_error_reporting.py index 292266a37..2d2552d2d 100644 --- a/src/stratis_cli/_error_reporting.py +++ b/src/stratis_cli/_error_reporting.py @@ -266,7 +266,7 @@ def _interpret_errors_2(errors: List[BaseException]) -> Optional[str]: # noqa: if dbus_name == "org.freedesktop.zbus.Error" and isinstance( context, DPClientSetPropertyContext - ): + ): # pragma: no cover return ( f"stratisd failed to perform the operation that you " f"requested, because it could not set the D-Bus " @@ -312,6 +312,15 @@ def _interpret_errors_2(errors: List[BaseException]) -> Optional[str]: # noqa: f"service sent the following message: {dbus_message}." ) + if isinstance(context, DPClientSetPropertyContext): # pragma: no cover + return ( + f"stratisd failed to perform the operation that you " + f"requested, because it could not set the D-Bus " + f'property "{context.property_name}" belonging to ' + f'interface "{error.interface_name}" to "{context.value}". ' + f"It returned the following error: {dbus_message}." + ) + if isinstance(context, DPClientGetPropertyContext): # pragma: no cover return ( f"stratisd failed to perform the operation that you " From c6d5a53cf148ae52ecc5eda8301dad042b37b22a Mon Sep 17 00:00:00 2001 From: mulhern Date: Wed, 10 Jun 2026 12:57:03 -0400 Subject: [PATCH 2/2] Remove match for org.freedesktop.zbus.Error Signed-off-by: mulhern --- src/stratis_cli/_error_reporting.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/stratis_cli/_error_reporting.py b/src/stratis_cli/_error_reporting.py index 2d2552d2d..31501e1e6 100644 --- a/src/stratis_cli/_error_reporting.py +++ b/src/stratis_cli/_error_reporting.py @@ -264,17 +264,6 @@ def _interpret_errors_2(errors: List[BaseException]) -> Optional[str]: # noqa: dbus_message = next_error.get_dbus_message() context = error.context - if dbus_name == "org.freedesktop.zbus.Error" and isinstance( - context, DPClientSetPropertyContext - ): # pragma: no cover - return ( - f"stratisd failed to perform the operation that you " - f"requested, because it could not set the D-Bus " - f'property "{context.property_name}" belonging to ' - f'interface "{error.interface_name}" to "{context.value}". ' - f"It returned the following error: {dbus_message}." - ) - # We do not test this error, as the only known way to cause it is # manipulation of selinux configuration, which is too laborious to # bother with at this time.