summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-07-05 10:31:50 -0400
committerBen Sima <ben@bsima.me>2022-07-05 10:31:50 -0400
commit161dbd8e5371fdc21054657cc08a1896187c27ef (patch)
tree3b8bf7bcb0ddb82b36deabcda0d663e8005d8a2c
parent4ea6c9cd08390c46506c0f0159f6cad34be8d408 (diff)
Move import statement
-rwxr-xr-xtwitter-bot11
1 files changed, 6 insertions, 5 deletions
diff --git a/twitter-bot b/twitter-bot
index 15823f4..d3ac28b 100755
--- a/twitter-bot
+++ b/twitter-bot
@@ -9,6 +9,12 @@ from configparser import ConfigParser, NoOptionError, NoSectionError
import zulip
+try:
+ import twitter
+except ImportError:
+ parser.error("Please install python-twitter")
+
+
VERSION = "0.9"
CONFIGFILE = os.path.expanduser("~/.zulip_twitterrc")
INSTRUCTIONS = r"""
@@ -142,11 +148,6 @@ try:
except (NoOptionError, NoSectionError):
previous_search_terms = ""
-try:
- import twitter
-except ImportError:
- parser.error("Please install python-twitter")
-
api = twitter.Api(
consumer_key=consumer_key,
consumer_secret=consumer_secret,