diff --git a/barbican/plugin/crypto/manager.py b/barbican/plugin/crypto/manager.py index 598a20da3..692b2d91b 100644 --- a/barbican/plugin/crypto/manager.py +++ b/barbican/plugin/crypto/manager.py @@ -78,7 +78,7 @@ class _CryptoPluginManager(named.NamedExtensionManager): """ active_plugins = plugin_utils.get_active_plugins(self) - if len(active_plugins) < 1: + if not active_plugins: raise crypto.CryptoPluginNotFound() for generating_plugin in active_plugins: @@ -99,7 +99,7 @@ class _CryptoPluginManager(named.NamedExtensionManager): """ active_plugins = plugin_utils.get_active_plugins(self) - if len(active_plugins) < 1: + if not active_plugins: raise crypto.CryptoPluginNotFound() for decrypting_plugin in active_plugins: diff --git a/barbican/plugin/interface/certificate_manager.py b/barbican/plugin/interface/certificate_manager.py index a58147fba..dda75250f 100644 --- a/barbican/plugin/interface/certificate_manager.py +++ b/barbican/plugin/interface/certificate_manager.py @@ -743,7 +743,7 @@ class _CertificateEventPluginManager(named.NamedExtensionManager, """Invoke same function on plugins as calling function.""" active_plugins = plugin_utils.get_active_plugins(self) - if len(active_plugins) < 1: + if not active_plugins: raise CertificateEventPluginNotFound() for plugin in active_plugins: diff --git a/barbican/plugin/interface/secret_store.py b/barbican/plugin/interface/secret_store.py index 71ceb47c4..7752422ed 100644 --- a/barbican/plugin/interface/secret_store.py +++ b/barbican/plugin/interface/secret_store.py @@ -477,7 +477,7 @@ class SecretStoreBase(object): def _enforce_extensions_configured(plugin_related_function): def _check_plugins_configured(self, *args, **kwargs): - if len(self.extensions) < 1: + if not self.extensions: raise SecretStorePluginsNotConfigured() return plugin_related_function(self, *args, **kwargs) return _check_plugins_configured