diff options
author | Florian Pritz <bluewind@xinu.at> | 2018-04-13 16:54:52 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2018-04-13 16:54:52 +0200 |
commit | a23a0874d15482df8fe89b3ac86d39eac2e7b705 (patch) | |
tree | e98a2cd4245206480b64420b4c31587a624de4f2 /bin | |
parent | 9c7b20f0a9d14f07b5e2be4c20dcc30da45ea7e3 (diff) | |
download | arch-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-x | bin/generate-mirror-mail.pl | 3 |
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; } |