From 161dbd8e5371fdc21054657cc08a1896187c27ef Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 5 Jul 2022 10:31:50 -0400 Subject: Move import statement --- twitter-bot | 11 ++++++----- 1 file 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, -- cgit v1.2.3