From f2456aa27e54ebed495c685e97711b5061a9f2d3 Mon Sep 17 00:00:00 2001 From: Xuezhong Kang Date: Thu, 11 Mar 2021 14:17:42 +0800 Subject: [PATCH] Optimize conditional statements Change-Id: I36ee83f552d528b467dcf2210d1920b6bb269cac --- barbican/plugin/crypto/simple_crypto.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/barbican/plugin/crypto/simple_crypto.py b/barbican/plugin/crypto/simple_crypto.py index e0c9e3a28..b81eddebb 100644 --- a/barbican/plugin/crypto/simple_crypto.py +++ b/barbican/plugin/crypto/simple_crypto.py @@ -189,8 +189,7 @@ class SimpleCryptoPlugin(c.CryptoPluginBase): mode=None): if type_enum == c.PluginSupportTypes.ENCRYPT_DECRYPT: return True - - if type_enum == c.PluginSupportTypes.SYMMETRIC_KEY_GENERATION: + elif type_enum == c.PluginSupportTypes.SYMMETRIC_KEY_GENERATION: return self._is_algorithm_supported(algorithm, bit_length, mode)