Sfoglia il codice sorgente

Do not complain about 403/404 errors in non-debug modes

Zachary Kotlarek 10 anni fa
parent
commit
21d17e8598
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      rss.pl

+ 3 - 1
rss.pl

@@ -348,7 +348,9 @@ foreach my $time (sort(@need)) {
 
 
 	# Cleanup
 	# Cleanup
 	if (defined($err)) {
 	if (defined($err)) {
-		print STDERR 'Unable to download ' . $ep->{'url'} . ': ' . $err . "\n";
+		if ($DEBUG || ($err != '403' && $err != '404')) {
+			print STDERR 'Unable to download ' . $ep->{'url'} . ': ' . $err . "\n";
+		}
 		if (-e $file) {
 		if (-e $file) {
 			unlink($file);
 			unlink($file);
 		}
 		}