Error messages were being passed with either JSON or HTML formatting
leading to an unpleasant user experience. This strips the JSON or HTML
tags and presents the clean error message to the user.
Rewrote the lispy function to be more pythonic, added test cases
and cleaned up some pep8 violations.
Removed commented out cruft from a previous version of this
patch.
Changed the HTML details from a set to a list in order to ensure
the ordering of the exception details.
Added code to eliminate the duplicate detail messages from the list
and reordered the assertion string to match actual output.
Refactored duplicate elimination code to be more readable and
reliable.
Some reworking of the duplication elimination loop to make it
more readable.
Removed unneeded conditional to filter out empty elements.
Reviewed: https:/ /review. openstack. org/148387 /git.openstack. org/cgit/ openstack/ python- glanceclient/ commit/ ?id=01caf4e734f b012f0b5b19c24a 8ffeaef31a06be
Committed: https:/
Submitter: Jenkins
Branch: master
commit 01caf4e734fb012 f0b5b19c24a8ffe aef31a06be
Author: d34dh0r53 <email address hidden>
Date: Mon Jan 19 18:02:08 2015 -0600
Strip json and html from error messages
Error messages were being passed with either JSON or HTML formatting
leading to an unpleasant user experience. This strips the JSON or HTML
tags and presents the clean error message to the user.
Rewrote the lispy function to be more pythonic, added test cases
and cleaned up some pep8 violations.
Removed commented out cruft from a previous version of this
patch.
Changed the HTML details from a set to a list in order to ensure
the ordering of the exception details.
Added code to eliminate the duplicate detail messages from the list
and reordered the assertion string to match actual output.
Refactored duplicate elimination code to be more readable and
reliable.
Some reworking of the duplication elimination loop to make it
more readable.
Removed unneeded conditional to filter out empty elements.
Change-Id: I79985b3e305cb3 0328a3c16b02531 5a8e969243d
Closes-Bug: 1398838