summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-04-13 16:54:52 +0200
committerFlorian Pritz <bluewind@xinu.at>2018-04-13 16:54:52 +0200
commita23a0874d15482df8fe89b3ac86d39eac2e7b705 (patch)
treee98a2cd4245206480b64420b4c31587a624de4f2 /bin
parent9c7b20f0a9d14f07b5e2be4c20dcc30da45ea7e3 (diff)
downloadarch-mirror-tools-a23a0874d15482df8fe89b3ac86d39eac2e7b705.tar.gz
arch-mirror-tools-a23a0874d15482df8fe89b3ac86d39eac2e7b705.tar.xz
generate-mirror-mail.pl: Skip inactive URLs when adding URL list to mail
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/generate-mirror-mail.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/generate-mirror-mail.pl b/bin/generate-mirror-mail.pl
index 4c06bc7..c6e8a19 100755
--- a/bin/generate-mirror-mail.pl
+++ b/bin/generate-mirror-mail.pl
@@ -198,7 +198,8 @@ while (<STDIN>) {
);
my @protocols = map {${$_}{protocol}} @connection_failed;
- if (scalar(@protocols) != scalar(@{$json->{urls}})) {
+ my @active_urls = grep { $_->{active} } @{$json->{urls}};
+ if (scalar(@protocols) != scalar(@active_urls)) {
$values{connection_failed}->{protocols} = \@protocols;
}