diff options
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-neutron/uuid_wscheck.patch')
| -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 |
