diff options
author | Simon Paillard <spaillard> | 2010-03-31 23:37:41 +0000 |
---|---|---|
committer | Simon Paillard <spaillard> | 2010-03-31 23:37:41 +0000 |
commit | 777d6375420993fc05d2e4844c5897fc801e2274 (patch) | |
tree | 888ffcb9354f9578cdc9e98a5f8508c815f59473 /english/mirror/arch_size.pl | |
parent | acd5a6d0fff1aea8a59e4bdabc3af27626a28d41 (diff) |
"ftp-master down case": do not erase size.data, timeout to 10 secs
CVS version numbers
english/mirror/Makefile: 1.57 -> 1.58
english/mirror/arch_size.pl: 1.4 -> 1.5
Diffstat (limited to 'english/mirror/arch_size.pl')
-rwxr-xr-x | english/mirror/arch_size.pl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/english/mirror/arch_size.pl b/english/mirror/arch_size.pl index c8c42314f0b..e925a9df287 100755 --- a/english/mirror/arch_size.pl +++ b/english/mirror/arch_size.pl @@ -10,11 +10,11 @@ my $inputfile="http://ftp-master.debian.org/arch-space"; my $ua = LWP::UserAgent->new; my $req = HTTP::Request->new(GET => $inputfile); +$ua->timeout("10"); my $res = $ua->request($req); ## Check the outcome of the response $res->is_success or die 'Input file cannot be fetched'; - my $arch_space = $res->content; my $total ; @@ -28,6 +28,9 @@ for my $line (split("\n",$arch_space)) { } } +open (OUTPUT, ">size.data") or die $!; +select OUTPUT; + printf "<tr><td>source</td>\t<td>%.0f</td></tr>\n", $space->{"Source"}; foreach my $key (sort keys %$space) { @@ -36,3 +39,5 @@ foreach my $key (sort keys %$space) { $total /= 1000000000 ; printf "<tr><td>Total</td>\t<td>%.0f</td></tr>\n", $total ; + +close OUTPUT; |