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
This commit is contained in:
Gábor Antal
2016-09-19 18:26:55 +02:00
parent 091d823712
commit fd2b066cd1

View File

@@ -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