diff --git a/nova/tests/integrated/api_samples_test_base.py b/nova/tests/integrated/api_samples_test_base.py index 8932adbee272..b66df9a0fbe1 100644 --- a/nova/tests/integrated/api_samples_test_base.py +++ b/nova/tests/integrated/api_samples_test_base.py @@ -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'