Commits

roadrunner  committed 80cea79

[svn r6098] Raise an error instead of silently listing no builds if an error occurred
trying to get the feed.

  • Participants
  • Parent commits 1913bf0

Comments (0)

Files changed (1)

File 0.10/HudsonTrac/HudsonTracPlugin.py

         add_stylesheet(req, 'HudsonTrac/hudsontrac.css')
 
         feed = feedparser.parse(self.feed_url, handlers=[self.bAuth, self.dAuth])
+        if getattr(feed, 'status', 0) >= 400:
+            raise IOError, "Error getting feed '%s': http-status=%d" % (self.feed_url, feed.status)
+        if feed.bozo:
+            raise IOError, "Error getting feed '%s': %s" % (self.feed_url, feed.bozo_exception)
 
         for entry in feed.entries:
             # Only look at top-level entries