summaryrefslogtreecommitdiff
path: root/JKTwitterBot/src/thebot.py
diff options
context:
space:
mode:
Diffstat (limited to 'JKTwitterBot/src/thebot.py')
-rw-r--r--JKTwitterBot/src/thebot.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/JKTwitterBot/src/thebot.py b/JKTwitterBot/src/thebot.py
index 0a01ec0..9af84ba 100644
--- a/JKTwitterBot/src/thebot.py
+++ b/JKTwitterBot/src/thebot.py
@@ -46,13 +46,16 @@ def status_update(outgoing_text):
print '====> (TEST MODE) Resp =', outgoing_text
def follow_user(user):
- try:
- poster.friendships.create(id=user)
- except TwitterError as e:
- print e
- poster.friendships.destroy(id=user)
- poster.friendships.create(id=user)
-
+ if not TEST_MODE:
+ try:
+ poster.friendships.create(id=user)
+ except TwitterError as e:
+ print e
+ poster.friendships.destroy(id=user)
+ poster.friendships.create(id=user)
+
+ else:
+ print '====> (TEST MODE) Following =', user
def reply_to_tweets():
results = reader.search(q=username, since_id=lastid)['results']