Changeset 35894
- Timestamp:
- Aug 6, 2013, 10:59:24 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/chip_imfile.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/chip_imfile.pl
r35811 r35894 348 348 } 349 349 } 350 # resolve uri 351 my $uriReal = $ipprc->file_resolve( $uri ); 352 # If instance is not found or if it doesn't exist try running neb-repair on it 353 # Note: file_exists returns false if the file exists but has zero size 354 if (!$uriReal or !$ipprc->file_exists($uriReal)) { 355 my $repair_cmd = "$nebrepair $uri"; 356 my ($repair_success, $repair_error_code, $repair_full_buf, $repair_stdout_buf, $repair_stderr_buf ) = run(command => $repair_cmd, verbose => $verbose); 357 unless ($repair_success) { 358 &my_die("Unable to attempt repair: $uri $repair_error_code", $exp_id,$chip_id, $class_id, $PS_EXIT_SYS_ERROR); 359 } 360 $uriReal = $ipprc->file_resolve( $uri ); 361 } 362 363 &my_die("Unable to resolve $uri on $host", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) if !$uriReal; 350 364 351 365 # if recipe option PPIMAGE:APPLY.BURNTOOL is set and the burntool information is stored in … … 378 392 my ($tempFile, $tempName) = tempfile( "/tmp/chip.$exp_id.$class_id.deburned.XXXX", 379 393 UNLINK => !$save_temps, SUFFIX => '.fits' ); 380 381 # get the UNIX version of the (possible) neb: or path: filename382 my $uriReal = $ipprc->file_resolve( $uri );383 # Catch errors here384 if (!$uriReal) {385 my $repair_cmd = "$nebrepair $uri";386 my ($repair_success, $repair_error_code, $repair_full_buf, $repair_stdout_buf, $repair_stderr_buf ) = run(command => $repair_cmd, verbose => $verbose);387 unless ($repair_success) {388 &my_die("Unable to attempt repair: $uri $repair_error_code", $exp_id,$chip_id, $class_id, $PS_EXIT_SYS_ERROR);389 }390 $uriReal = $ipprc->file_resolve( $uri );391 }392 393 &my_die("Unable to resolve $uri on $host", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) if !$uriReal;394 394 395 395 # funpack into the temp file.
Note:
See TracChangeset
for help on using the changeset viewer.
