Jelajahi Sumber

Only whine about failed saves in DEBUG

Zachary Kotlarek 9 tahun lalu
induk
melakukan
b770a3fc55
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 3 1
      Fetch.pm

+ 3 - 1
Fetch.pm

@@ -641,7 +641,9 @@ sub save() {
 	# Bail on bad HTTP result codes (if we're checking)
 	# Bail on bad HTTP result codes (if we're checking)
 	if (!$params{'nocheck'}) {
 	if (!$params{'nocheck'}) {
 		if ($self->Fetch::status_code() != 200) {
 		if ($self->Fetch::status_code() != 200) {
-			print STDERR "Fetch::save: Refusing to save file with bad status code\n";
+			if ($DEBUG) {
+				print STDERR "Fetch::save: Refusing to save file with bad status code\n";
+			}
 			return 1;
 			return 1;
 		}
 		}
 	}
 	}