- Timestamp:
- Dec 2, 2011, 11:44:07 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/ippScripts/scripts/videophot_process.pl
r32749 r32851 32 32 my $listvideocells = can_run('listvideocells.pl') or (warn "Can't find listvideocells.pl" and $missing_tools = 1); 33 33 my $dsreg = can_run('dsreg') or (warn "Can't find dsreg" and $missing_tools = 1); 34 my $nebrepair = can_run('neb-repair') or (warn "Can't find neb-repair" and $missing_tools = 1); 34 35 if ($missing_tools) { 35 36 warn("Can't find required tools."); … … 116 117 run(command => $command, verbose => $verbose); 117 118 unless ($success) { 119 check_input_file($uri, $vp_id, $class_id, 'nocell'); 118 120 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 119 121 &my_die("Unable to perform $command: $error_code", $vp_id, $error_code); … … 244 246 exit 0; 245 247 248 sub check_input_file { 249 my $uri = shift; 250 my $vp_id = shift; 251 my $class_id = shift; 252 my $cell_id = shift; 253 my $resolved = $ipprc->file_resolve($uri); 254 255 my $tryrepair = 0; 256 if (!-e $resolved) { 257 printf STDERR "instance $resolved for $uri does not exist\n"; 258 $tryrepair = 1; 259 } elsif (-s $resolved == 0) { 260 printf STDERR "instance $resolved for $uri is empty\n"; 261 $tryrepair = 1; 262 } 263 if ($tryrepair) { 264 my $scheme = file_scheme($uri); 265 if ($scheme and ($scheme = 'neb')) { 266 my $command = "$nebrepair $uri"; 267 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 268 run(command => $command, verbose => $verbose); 269 unless ($success) { 270 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 271 my $err_message = "Unable to perform nebrepair"; 272 &my_die("$err_message: $error_code", $vp_id, $error_code); 273 } 274 } 275 } 276 } 277 246 278 sub my_die 247 279 {
Note:
See TracChangeset
for help on using the changeset viewer.
