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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user