Catch SyntaxError when importing coreapi with python 3.2

This commit is contained in:
Tom Christie 2016-06-09 13:53:55 +01:00
parent 56ece731e2
commit 99adbf19d3

View File

@ -160,7 +160,8 @@ except ImportError:
try:
import coreapi
import uritemplate
except ImportError:
except (ImportError, SyntaxError):
# SyntaxError is possible under python 3.2
coreapi = None
uritemplate = None