Add support for python2 type json exceptions.
This commit is contained in:
parent
bd808e4bc2
commit
81e078173a
1 changed files with 5 additions and 0 deletions
|
@ -22,6 +22,11 @@ import json
|
||||||
from enum import Enum, unique
|
from enum import Enum, unique
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
|
try:
|
||||||
|
from json.decoder import JSONDecodeError
|
||||||
|
except ImportError:
|
||||||
|
JSONDecodeError = ValueError
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from urllib import quote, urlencode
|
from urllib import quote, urlencode
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
Loading…
Reference in a new issue