[SimBot-commits] CVS: simbot/tools create_wx_station_db.pl,1.6,1.7
Status: Abandoned
Brought to you by:
kstange
|
From: Pete P. <fou...@us...> - 2005-07-14 00:08:44
|
Update of /cvsroot/simbot/simbot/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29421/tools Modified Files: create_wx_station_db.pl Log Message: We now rollback the database and exit on errors instead of trying to continue. Index: create_wx_station_db.pl =================================================================== RCS file: /cvsroot/simbot/simbot/tools/create_wx_station_db.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -p -r1.6 -r1.7 --- create_wx_station_db.pl 21 Jun 2005 19:33:58 -0000 1.6 +++ create_wx_station_db.pl 14 Jul 2005 00:08:35 -0000 1.7 @@ -72,6 +72,8 @@ my $response = $ua->get('http://weather. if($response->is_error) { print STDERR "Failed!\n " . $response->code . ' ' . $response->message . "\n"; + $dbh->rollback; + exit(1); } else { print "Done!\nReading it in"; my $content = $response->decoded_content; @@ -122,6 +124,8 @@ $response = $ua->get('ftp://weather.noaa if($response->is_error) { print STDERR "Failed! " . $response->code . ' ' . $response->message . "\n"; + $dbh->rollback; + exit(1); } else { my $line_count = 0; print "Done!\nReading it in"; |