From cc92fe8badfe32f4c55abfa8b249dc1f94936d7c Mon Sep 17 00:00:00 2001 From: David Kupka Date: Wed, 3 Aug 2016 10:35:40 +0200 Subject: [PATCH] vault: Catch correct exception in decrypt ValueError is raised when decryption fails. https://fedorahosted.org/freeipa/ticket/6160 Reviewed-By: David Kupka --- ipaclient/plugins/vault.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipaclient/plugins/vault.py b/ipaclient/plugins/vault.py index e3a1ae3a0ad767bcee843b7fa3743a934e02d18b..73ad09b38316d55b466b7973dbeffefc1b7bb528 100644 --- a/ipaclient/plugins/vault.py +++ b/ipaclient/plugins/vault.py @@ -164,7 +164,7 @@ def decrypt(data, symmetric_key=None, private_key=None): label=None ) ) - except AssertionError: + except ValueError: raise errors.AuthenticationError( message=_('Invalid credentials')) -- 2.7.4