Преглед изворни кода

Only whine about failed saves in DEBUG

Zachary Kotlarek пре 9 година
родитељ
комит
b770a3fc55
1 измењених фајлова са 3 додато и 1 уклоњено
  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)
 	if (!$params{'nocheck'}) {
 		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;
 		}
 	}