From fd2b066cd19ce77a0e8dd48b71a09842e2c020b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Antal?= Date: Mon, 19 Sep 2016 18:26:55 +0200 Subject: [PATCH] Replaced bare except According to H201 [1], we shouldn't use bare except, use 'except Exception:' at least. In this patchset, it is fixed. [1]: http://docs.openstack.org/developer/hacking/ Change-Id: Id64712dba67db53a7c20ef38b56c20cebcd63821 --- barbicanclient/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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