diff --git a/barbicanclient/base.py b/barbicanclient/base.py index 168ece12..738526bb 100644 --- a/barbicanclient/base.py +++ b/barbicanclient/base.py @@ -39,7 +39,7 @@ def validate_ref(ref, entity): try: _, entity_uuid = ref.rstrip('/').rsplit('/', 1) uuid.UUID(entity_uuid) - except: + except Exception: raise ValueError('{0} incorrectly specified.'.format(entity)) return True diff --git a/barbicanclient/tests/keystone_client_fixtures.py b/barbicanclient/tests/keystone_client_fixtures.py index eb3de381..202bedd0 100644 --- a/barbicanclient/tests/keystone_client_fixtures.py +++ b/barbicanclient/tests/keystone_client_fixtures.py @@ -236,7 +236,7 @@ class KeystoneClientFixture(testtools.TestCase): try: self.barbican.run(argv=argv) - except: + except Exception: self.fail('failed to delete secret') def test_v2_auth(self):