diff options
Diffstat (limited to 'rhautoimport.pm')
-rw-r--r-- | rhautoimport.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/rhautoimport.pm b/rhautoimport.pm index f2e24cc..bb0c015 100644 --- a/rhautoimport.pm +++ b/rhautoimport.pm @@ -67,10 +67,9 @@ sub fetch_parse_rss my $ua = LWP::UserAgent->new; $ua->agent($ua_str); $ua->env_proxy; - my $res = URI::Fetch->fetch($uri, UserAgent => $ua) - or die URI::Fetch->errstr; - die "This feed has been permanently removed" - if $res->status == URI::Fetch::URI_GONE(); + my $res = URI::Fetch->fetch($uri, UserAgent => $ua); + return (undef, URI::Fetch->errstr) unless $res; + return (undef, "This feed has been permanently removed") if $res->status == URI::Fetch::URI_GONE(); my $xml = $res->content; |