diff --git a/nova/tests/unit/test_api_validation.py b/nova/tests/unit/test_api_validation.py index c71266c3ce..cc5d48c7fc 100644 --- a/nova/tests/unit/test_api_validation.py +++ b/nova/tests/unit/test_api_validation.py @@ -14,7 +14,6 @@ import copy import re -import sys import fixtures from jsonschema import exceptions as jsonschema_exc @@ -444,7 +443,7 @@ class PatternPropertiesTestCase(APIValidationTestCase): # Note(jrosenboom): This is referencing an internal python error # string, which is no stable interface. We need a patch in the # jsonschema library in order to fix this properly. - if sys.version[:3] in ['3.5', '3.6', '3.7']: + if six.PY3: detail = "expected string or bytes-like object" else: detail = "expected string or buffer"