# HG changeset patch # User Jeff Hammel # Date 1280153317 25200 # Node ID ed3c5f7ba34878936ec9983aa033247d27ece404 # Parent 50f77774a20a48803887e829a54b415841871371 print to stderr instead of dying on exceptions diff -r 50f77774a20a -r ed3c5f7ba348 bitsytweet/__init__.py --- a/bitsytweet/__init__.py Thu Jul 08 11:13:43 2010 -0700 +++ b/bitsytweet/__init__.py Mon Jul 26 07:08:37 2010 -0700 @@ -1,7 +1,8 @@ """ -BitsyTweet +BitsyTweet - tweet your bitsyblog entries (horrid, I know) """ +import sys import twitter class BitsyTweet(object): @@ -15,4 +16,7 @@ def __call__(self, blog_entry, url): if blog_entry.privacy == 'public': # only tweet public blogs tweet = '%s : %s' % (blog_entry.snippet(), url) - self.api.PostUpdate(tweet) + try: + self.api.PostUpdate(tweet) + except Exception, e: + print >> sys.stderr, "Couldn't tweet %s (%s)" % (url, e)