Changeset 676 for confluence

Show
Ignore:
Timestamp:
11/03/09 13:27:35 (9 months ago)
Author:
confluence
Message:

wrapped Twitter API calls in a try/except just in case the internet has asploded or something

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • confluence/emailfilters/twitterbouncer.py

    r675 r676  
    7979if bad_score > MAX_BAD_SCORE: 
    8080    print "BAD!" 
    81     t = twitter.Twitter() 
    82     t.set_auth(username, password) 
    83     t.block_create(user) 
     81    try: 
     82        t = twitter.Twitter() 
     83        t.set_auth(username, password) 
     84        t.block_create(user) 
     85    except Exception, e: 
     86        print "Out of cheese error, redo from start: %s" % e 
     87        sys.exit(1)