diff options
| author | Keith Holman <Keith.Holman@windriver.com> | 2014-06-13 15:17:58 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-06-16 15:23:41 -0400 |
| commit | 628887f1a818e3e4dbd52b3d8bf81651e47b2c08 (patch) | |
| tree | a3fc33ff95390386703552e120e265298c2db98a /meta-openstack/recipes-devtools/python | |
| parent | 9ea09886b02756ec6449837040921f9207b8d4ac (diff) | |
| download | meta-cloud-services-628887f1a818e3e4dbd52b3d8bf81651e47b2c08.tar.gz | |
barbican: handle white space in date strings
Barbican tests fail because white space is not being properly parsed
by the iso8601 python package. This fix updates the barbican code
using a patch file to strip white space from the date before passing
it to the is8601 package for parsing.
Signed-off-by: Keith Holman <Keith.Holman@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-barbican/barbican-handle-white-space-in-date-strings.patch | 31 | ||||
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-barbican_git.bb | 1 |
2 files changed, 32 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-barbican/barbican-handle-white-space-in-date-strings.patch b/meta-openstack/recipes-devtools/python/python-barbican/barbican-handle-white-space-in-date-strings.patch new file mode 100644 index 0000000..3b8a35d --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-barbican/barbican-handle-white-space-in-date-strings.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | From ddc04ef2f9d74bfc65c008e691ba0955f415d3f9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Keith Holman <Keith.Holman@windriver.com> | ||
| 3 | Date: Fri, 13 Jun 2014 15:14:58 -0400 | ||
| 4 | Subject: [PATCH] barbican: handle white space in date strings | ||
| 5 | |||
| 6 | Barbican tests fail because white space is not being properly parsed | ||
| 7 | by the iso8601 python package. This fix updates the barbican code to | ||
| 8 | strip white space from the date string before passing it to the | ||
| 9 | iso8601 package for parsing. | ||
| 10 | |||
| 11 | Signed-off-by: Keith Holman <Keith.Holman@windriver.com> | ||
| 12 | --- | ||
| 13 | barbican/openstack/common/timeutils.py | 2 +- | ||
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/barbican/openstack/common/timeutils.py b/barbican/openstack/common/timeutils.py | ||
| 17 | index 52688a0..497f00e 100644 | ||
| 18 | --- a/barbican/openstack/common/timeutils.py | ||
| 19 | +++ b/barbican/openstack/common/timeutils.py | ||
| 20 | @@ -46,7 +46,7 @@ def isotime(at=None, subsecond=False): | ||
| 21 | def parse_isotime(timestr): | ||
| 22 | """Parse time from ISO 8601 format.""" | ||
| 23 | try: | ||
| 24 | - return iso8601.parse_date(timestr) | ||
| 25 | + return iso8601.parse_date(timestr.strip()) | ||
| 26 | except iso8601.ParseError as e: | ||
| 27 | raise ValueError(six.text_type(e)) | ||
| 28 | except TypeError as e: | ||
| 29 | -- | ||
| 30 | 1.9.3 | ||
| 31 | |||
diff --git a/meta-openstack/recipes-devtools/python/python-barbican_git.bb b/meta-openstack/recipes-devtools/python/python-barbican_git.bb index 8e53efd..b0d32ae 100644 --- a/meta-openstack/recipes-devtools/python/python-barbican_git.bb +++ b/meta-openstack/recipes-devtools/python/python-barbican_git.bb | |||
| @@ -12,6 +12,7 @@ SRC_URI = "git://github.com/openstack/barbican.git;branch=master \ | |||
| 12 | file://barbican.init \ | 12 | file://barbican.init \ |
| 13 | file://barbican-increase-buffer-size-to-support-PKI-tokens.patch \ | 13 | file://barbican-increase-buffer-size-to-support-PKI-tokens.patch \ |
| 14 | file://barbican-fix-path-to-find-configuration-files.patch \ | 14 | file://barbican-fix-path-to-find-configuration-files.patch \ |
| 15 | file://barbican-handle-white-space-in-date-strings.patch \ | ||
| 15 | " | 16 | " |
| 16 | 17 | ||
| 17 | SRCREV="177d4499af6b261f48814503e3565f433e86cc66" | 18 | SRCREV="177d4499af6b261f48814503e3565f433e86cc66" |
