From 628887f1a818e3e4dbd52b3d8bf81651e47b2c08 Mon Sep 17 00:00:00 2001 From: Keith Holman Date: Fri, 13 Jun 2014 15:17:58 -0400 Subject: 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 Signed-off-by: Bruce Ashfield --- ...rbican-handle-white-space-in-date-strings.patch | 31 ++++++++++++++++++++++ .../recipes-devtools/python/python-barbican_git.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta-openstack/recipes-devtools/python/python-barbican/barbican-handle-white-space-in-date-strings.patch (limited to 'meta-openstack/recipes-devtools/python') 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 @@ +From ddc04ef2f9d74bfc65c008e691ba0955f415d3f9 Mon Sep 17 00:00:00 2001 +From: Keith Holman +Date: Fri, 13 Jun 2014 15:14:58 -0400 +Subject: [PATCH] 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 to +strip white space from the date string before passing it to the +iso8601 package for parsing. + +Signed-off-by: Keith Holman +--- + barbican/openstack/common/timeutils.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/barbican/openstack/common/timeutils.py b/barbican/openstack/common/timeutils.py +index 52688a0..497f00e 100644 +--- a/barbican/openstack/common/timeutils.py ++++ b/barbican/openstack/common/timeutils.py +@@ -46,7 +46,7 @@ def isotime(at=None, subsecond=False): + def parse_isotime(timestr): + """Parse time from ISO 8601 format.""" + try: +- return iso8601.parse_date(timestr) ++ return iso8601.parse_date(timestr.strip()) + except iso8601.ParseError as e: + raise ValueError(six.text_type(e)) + except TypeError as e: +-- +1.9.3 + 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 \ file://barbican.init \ file://barbican-increase-buffer-size-to-support-PKI-tokens.patch \ file://barbican-fix-path-to-find-configuration-files.patch \ + file://barbican-handle-white-space-in-date-strings.patch \ " SRCREV="177d4499af6b261f48814503e3565f433e86cc66" -- cgit v1.2.3-54-g00ecf