IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27634


Ignore:
Timestamp:
Apr 7, 2010, 3:06:57 PM (16 years ago)
Author:
Paul Price
Message:

Don't require the file until after we've had a chance to recreate it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/magic_process.pl

    r27596 r27634  
    142142        my $tempName = $innode->{inverse} ? "PPSUB.INPUT.CONV" : "PPSUB.REF.CONV"; # File rule of interest
    143143        my $template = $ipprc->file_resolve($ipprc->filename($tempName, $diff_base));
    144         &my_die("failed to resolve template", $magic_id, $node, $PS_EXIT_DATA_ERROR) unless defined $template;
    145144
    146145        # Delete the convolved products when done (we can recreate them as we need)
    147         push @deletions, $template;
    148146        push @deletions, $ipprc->filename($tempName . ".MASK", $diff_base);
    149147        push @deletions, $ipprc->filename($tempName . ".VARIANCE", $diff_base);
    150148
    151         unless ($ipprc->file_exists($template)) {
     149        unless (defined $template and $ipprc->file_exists($template)) {
    152150            # Template doesn't exist (or can't be found); try to recreate it
    153151            my $tempPath = "/tmp/magic.$magic_id.$node.template";
     
    208206                $template = $ipprc->file_resolve($template) or &my_die("Unable to resolve filename for created template", $magic_id, $node, $PS_EXIT_PROG_ERROR);
    209207                &my_die("Unable to find created template", $magic_id, $node, $PS_EXIT_PROG_ERROR) unless $ipprc->file_exists($template);
    210                 push @deletions, $template;
    211208            }
    212209        }
     210
     211        &my_die("Cannot find template", $magic_id, $node, $PS_EXIT_DATA_ERROR) unless defined $template and $ipprc->file_exists($template);
     212        push @deletions, $template;
    213213
    214214        $command .= " --detect --image $image --mask $mask --weight $weight -k $template";
Note: See TracChangeset for help on using the changeset viewer.