Merge "Fixes AttributeError with api sample test fail"

This commit is contained in:
Jenkins 2014-09-22 12:02:30 +00:00 committed by Gerrit Code Review
commit 0a9360c959
1 changed files with 2 additions and 1 deletions

View File

@ -197,7 +197,8 @@ class ApiSampleTestBase(integrated_helpers._IntegratedTestBase):
if isinstance(expected, six.string_types):
# NOTE(danms): Ignore whitespace in this comparison
expected = expected.strip()
result = result.strip()
if isinstance(result, six.string_types):
result = result.strip()
if expected != result:
raise NoMatch(
_('Values do not match:\n'