Permalink
Browse files

Don't freak out on broken feeds

  • Loading branch information...
1 parent 3c11652 commit 37b0fe5c37ae65a5bad9adb31219e3c190038d1a @craigw committed Oct 8, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 bin/bercow
  2. +1 −1 lib/bercow/version.rb
View
@@ -77,7 +77,7 @@ rss.root.add_namespace_definition 'itunes', 'http://www.itunes.com/dtds/podcast-
rss_host = URI.parse(options['rss']).host
rss_url = "#{options['host']}#{rss_host}/rss.xml"
reference = rss.xpath("//channel/atom:link[@rel = 'self']", "atom" => "http://www.w3.org/2005/Atom").to_a[0]
-reference['href'] = rss_url
+reference['href'] = rss_url unless reference.nil?
host_root = File.join options['cache'], rss_host
rss_feed = File.join host_root, 'rss.xml'
View
@@ -1,3 +1,3 @@
module Bercow
- VERSION = '0.0.4'
+ VERSION = '0.0.5'
end

0 comments on commit 37b0fe5

Please sign in to comment.