Changeset 27211 in osm for applications/editors/josm
- Timestamp:
- 2011-12-11T15:24:38+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/i18n/launchpad.pl
r27210 r27211 229 229 sub doget 230 230 { 231 my ($mech, $page) = @_; 232 for(my $i = 1; $i <= 5 0; $i++)231 my ($mech, $page, $arg) = @_; 232 for(my $i = 1; $i <= 5; $i++) 233 233 { 234 234 $mech->timeout(30); … … 241 241 return $mech if !$@; 242 242 sleep(30+5*$i); 243 last if $arg && $arg eq "no503" and $code == 503; 243 244 $mech = WWW::Mechanize->new("agent" => $agent); 244 245 } … … 281 282 } 282 283 my $urlcode = URI::Escape::uri_escape($code); 283 $mech = doget($mech, "https://translations.launchpad.net/josm/trunk/+pots/josm/$lang/+filter?person=$urlcode"); 284 $mech = doget($mech, "https://translations.launchpad.net/josm/trunk/+pots/josm/$lang/+filter?person=$urlcode", "no503"); 284 285 sleep(1); 285 my ($count) = $mech->content() =~ /of[\r\n\t ]+?(\d+)[\r\n\t ]+?result/; 286 my $cont = $mech->content() || ""; 287 my ($count) = $cont =~ /of[\r\n\t ]+?(\d+)[\r\n\t ]+?result/; 286 288 if($count && $mech->status == 200) 287 289 {
Note:
See TracChangeset
for help on using the changeset viewer.