From 9ad343968947fc025b530644c3369c60a2c14ea5 Mon Sep 17 00:00:00 2001 From: Andreas Florath Date: Thu, 19 Sep 2019 11:44:14 +0000 Subject: [PATCH] Fix osc-lib interface change: catch osc-lib Forbidden The patch https://review.opendev.org/#/c/673389/ introduced a regression by changing the osc-lib interface. The patch https://review.opendev.org/683119 changes the exception from the generic CommandError back to a specific Forbidden exception. This patch catches this exception and passes on, i.e. re-implements the same behavior as before. Story: 2006547 Change-Id: I17b1ec7abaa5b0828ccbcad40bd928565c5c59fb Signed-off-by: Andreas Florath --- openstackclient/identity/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstackclient/identity/common.py b/openstackclient/identity/common.py index e825116649..d125d2851d 100644 --- a/openstackclient/identity/common.py +++ b/openstackclient/identity/common.py @@ -207,7 +207,7 @@ def _find_identity_resource(identity_client_manager, name_or_id, name_or_id, **kwargs) if identity_resource is not None: return identity_resource - except identity_exc.Forbidden: + except exceptions.Forbidden: pass return resource_type(None, {'id': name_or_id, 'name': name_or_id})