Skip to content

Commit

Permalink
Handle simplejson being installed when handling JSONDecodeError
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed Sep 29, 2021
1 parent 5e15e2a commit 586c162
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tweepy/errors.py
Expand Up @@ -2,7 +2,12 @@
# Copyright 2009-2021 Joshua Roesslein
# See LICENSE for details.

import json
try:
# Handle https://github.com/psf/requests/issues/5794 until requests 2.27.0
# is released with https://github.com/psf/requests/pull/5856
import simplejson as json
except ImportError:
import json


class TweepyException(Exception):
Expand Down

0 comments on commit 586c162

Please sign in to comment.