mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-07 22:04:48 +03:00
Catch SyntaxError when importing coreapi with python 3.2
This commit is contained in:
parent
56ece731e2
commit
99adbf19d3
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user