def process_blog(url, email, password): try: with Session(email, password) as session: try: blog = Blog(session, url) except IOError: logger.error( "Failed to fetch RSS feed. Possibly the URL of your blog is incorrect or its not powered at Blogger." ) return 1 blog.update_meta_tags() except Error, e: logger.error(unicode(e)) return 1
session = Session(email, password) except Error, e: logger.warn("Skipping blog '%s'. Login failed.\n%s" % (name, e)) continue sessions[user] = session except NoOptionError, e: logger.warn("Skipping blog '%s'. No %s configured for %s." % (name, e.option, e.section.split()[0])) continue except NoSectionError, e: logger.warn("Skipping blog '%s'. The %s is not configured." % (name, e.section.split()[0])) continue try: try: blog = Blog(session, url) except IOError: logger.warn( "Skipping blog '%s'. Failed to fetch RSS feed. Possibly the URL of your blog is incorrect or its not powered at Blogger." % name ) continue blog.update_meta_tags() except Error, e: logger.warn("Skipping blog '%s'. Failed to update meta tags.\n%s" % (name, e)) continue logger.info("Updated meta tags for blog '%s' (%s)." % (name, url)) except IOError: logger.error("Failed to connect. Possibly you are offline.") return 1