From 8b036d28a3af83ebf319c9b602f739458ac859b9 Mon Sep 17 00:00:00 2001 From: Amy Fong Date: Thu, 26 Jun 2014 10:28:47 -0400 Subject: neutron: uuid whitespace check fix The uuid candidate may be none, need to check for this. Signed-off-by: Amy Fong --- .../recipes-devtools/python/python-neutron/uuid_wscheck.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-openstack/recipes-devtools/python/python-neutron/uuid_wscheck.patch b/meta-openstack/recipes-devtools/python/python-neutron/uuid_wscheck.patch index f3748d6..fd94788 100644 --- a/meta-openstack/recipes-devtools/python/python-neutron/uuid_wscheck.patch +++ b/meta-openstack/recipes-devtools/python/python-neutron/uuid_wscheck.patch @@ -8,7 +8,7 @@ Index: git/neutron/api/v2/attributes.py def _validate_uuid(data, valid_values=None): if not uuidutils.is_uuid_like(data): - msg = _("'%s' is not a valid UUID") % data -+ if data != data.rstrip(): ++ if data is not None and data != data.rstrip(): + msg = _("'%s' is not a valid UUID: trailing whitespace?") % data + else: + msg = _("'%s' is not a valid UUID") % data @@ -25,7 +25,7 @@ Index: git/neutron/plugins/cisco/n1kv/n1kv_neutron_plugin.py else: - LOG.debug(_('%s is not a valid uuid'), segment) - msg = _("'%s' is not a valid UUID") % segment -+ if segment != segment.rstrip(): ++ if segment is not None and segment != segment.rstrip(): + msg = _("'%s' is not a valid UUID: trailing whitespace?") % segment + else: + msg = _("'%s' is not a valid UUID") % segment -- cgit v1.2.3-54-g00ecf