diff options
author | Amy Fong <amy.fong@windriver.com> | 2014-06-26 10:28:47 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-07-17 00:10:23 -0400 |
commit | 8b036d28a3af83ebf319c9b602f739458ac859b9 (patch) | |
tree | 214f40bab7bb0273918ab5c09a5aa2baf7cc7784 /meta-openstack/recipes-devtools/python | |
parent | 197ec92e7a97b0a13b49b3000263759ea7846b4b (diff) | |
download | meta-cloud-services-8b036d28a3af83ebf319c9b602f739458ac859b9.tar.gz |
neutron: uuid whitespace check fix
The uuid candidate may be none, need to check for this.
Signed-off-by: Amy Fong <amy.fong@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python')
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-neutron/uuid_wscheck.patch | 4 |
1 files 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 | |||
8 | def _validate_uuid(data, valid_values=None): | 8 | def _validate_uuid(data, valid_values=None): |
9 | if not uuidutils.is_uuid_like(data): | 9 | if not uuidutils.is_uuid_like(data): |
10 | - msg = _("'%s' is not a valid UUID") % data | 10 | - msg = _("'%s' is not a valid UUID") % data |
11 | + if data != data.rstrip(): | 11 | + if data is not None and data != data.rstrip(): |
12 | + msg = _("'%s' is not a valid UUID: trailing whitespace?") % data | 12 | + msg = _("'%s' is not a valid UUID: trailing whitespace?") % data |
13 | + else: | 13 | + else: |
14 | + msg = _("'%s' is not a valid UUID") % data | 14 | + msg = _("'%s' is not a valid UUID") % data |
@@ -25,7 +25,7 @@ Index: git/neutron/plugins/cisco/n1kv/n1kv_neutron_plugin.py | |||
25 | else: | 25 | else: |
26 | - LOG.debug(_('%s is not a valid uuid'), segment) | 26 | - LOG.debug(_('%s is not a valid uuid'), segment) |
27 | - msg = _("'%s' is not a valid UUID") % segment | 27 | - msg = _("'%s' is not a valid UUID") % segment |
28 | + if segment != segment.rstrip(): | 28 | + if segment is not None and segment != segment.rstrip(): |
29 | + msg = _("'%s' is not a valid UUID: trailing whitespace?") % segment | 29 | + msg = _("'%s' is not a valid UUID: trailing whitespace?") % segment |
30 | + else: | 30 | + else: |
31 | + msg = _("'%s' is not a valid UUID") % segment | 31 | + msg = _("'%s' is not a valid UUID") % segment |