Skip to content

Commit 892e119

Browse files
Cleanup
1 parent 656f0b6 commit 892e119

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

json_field/fields.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@
1212
from datetime import datetime
1313
try:
1414
from dateutil import parser as date_parser
15-
except ImportError, e:
15+
except ImportError:
1616
raise ImproperlyConfigured('The "dateutil" library is required and was not found.')
1717

1818
try:
1919
JSON_DECODE_ERROR = json.JSONDecodeError # simplejson
2020
except AttributeError:
21-
JSON_DECODE_ERROR = ValueError # Python json lib
21+
JSON_DECODE_ERROR = ValueError # other
2222

2323
TIME_RE = re.compile(r'^\d{2}:\d{2}:\d{2}')
2424
DATE_RE = re.compile(r'^\d{4}-\d{2}-\d{2}(?!T)')
2525
DATETIME_RE = re.compile(r'^\d{4}-\d{2}-\d{2}T')
2626

2727
class JSONDecoder(json.JSONDecoder):
28+
""" Recursive JSON to Python deserialization. """
2829

2930
_recursable_types = [str, unicode, list, dict]
3031

0 commit comments

Comments
 (0)