From d2e7bb04317f62643ab2005b601da2265c502c93 Mon Sep 17 00:00:00 2001 From: Zhongyue Luo Date: Wed, 31 Oct 2012 13:19:10 +0800 Subject: Use uuidutils.is_uuid_like for uuid validation Change-Id: I8fc760062ecaee45d263db663a52971be96f264a --- nova/utils.py | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'nova/utils.py') diff --git a/nova/utils.py b/nova/utils.py index 284d72b55..d97c2ce3f 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -772,18 +772,6 @@ def gen_uuid(): return uuid.uuid4() -def is_uuid_like(val): - """For our purposes, a UUID is a string in canonical form: - - aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa - """ - try: - uuid.UUID(val) - return True - except (TypeError, ValueError, AttributeError): - return False - - def bool_from_str(val): """Convert a string representation of a bool into a bool value""" -- cgit