mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
markdown: Remove handler for old bug with incompatible twitter library.
See commit 8b002040e0 and #86. The
development environment bug that necessitated this handler has long
been irrelevant.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
b9fd49a2c6
commit
e513b75e86
@@ -388,8 +388,9 @@ def fetch_tweet_data(tweet_id: str) -> Optional[Dict[str, Any]]:
|
||||
# the startup performance of `manage.py` commands.
|
||||
import twitter
|
||||
|
||||
api = twitter.Api(tweet_mode='extended', **creds)
|
||||
|
||||
try:
|
||||
api = twitter.Api(tweet_mode='extended', **creds)
|
||||
# Sometimes Twitter hangs on responses. Timing out here
|
||||
# will cause the Tweet to go through as-is with no inline
|
||||
# preview, rather than having the message be rejected
|
||||
@@ -397,10 +398,6 @@ def fetch_tweet_data(tweet_id: str) -> Optional[Dict[str, Any]]:
|
||||
# formatting timeout.
|
||||
tweet = timeout(3, api.GetStatus, tweet_id)
|
||||
res = tweet.AsDict()
|
||||
except AttributeError:
|
||||
markdown_logger.error('Unable to load twitter api, you may have the wrong '
|
||||
'library installed, see https://github.com/zulip/zulip/issues/86')
|
||||
return None
|
||||
except TimeoutExpired:
|
||||
# We'd like to try again later and not cache the bad result,
|
||||
# so we need to re-raise the exception (just as though
|
||||
|
||||
Reference in New Issue
Block a user