IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 4, 2009, 4:17:15 PM (17 years ago)
Author:
Paul Price
Message:

Removing the exception handling I put in the other day. We suspect it's interfering with kapa falling over when the pipe is cut. Instead, being more careful with checking return status of PS::IPP::Config->new() and 6752ipprc->redirect_output(), combined with recent change to PS::IPP::Config should mean the former trouble of Perl scripts exiting without pushing exit status into the database should still be solved.

File:
1 edited

Legend:

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

    r21006 r23186  
    2525use PS::IPP::Config 1.01 qw( :standard );
    2626
    27 my $ipprc = PS::IPP::Config->new(); # IPP configuration
    28 
    2927use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
    3028use Pod::Usage qw( pod2usage );
    3129
     30# Look for programs we need
     31my $missing_tools;
     32my $magictool = can_run('magictool') or (warn "Can't find magictool" and $missing_tools = 1);
     33my $difftool  = can_run('difftool') or (warn "Can't find difftool" and $missing_tools = 1);
     34my $warptool  = can_run('warptool') or (warn "Can't find warptool" and $missing_tools = 1);
     35if ($missing_tools) {
     36    warn("Can't find required tools.");
     37    exit($PS_EXIT_CONFIG_ERROR);
     38}
     39
    3240# Parse the command-line arguments
    3341my ($exp_id, $warp_id, $min_diff_id, $label, $workdir, $dbname, $save_temps, $verbose);
    34 
    3542GetOptions(
    3643           'exp_id=s'        => \$exp_id,     # exposure identifier
     
    5057    defined $warp_id;
    5158
    52 # $ipprc->define_camera($camera);
    53 
    54 # Look for programs we need
    55 my $missing_tools;
    56 my $magictool = can_run('magictool') or (warn "Can't find magictool" and $missing_tools = 1);
    57 my $difftool  = can_run('difftool') or (warn "Can't find difftool" and $missing_tools = 1);
    58 my $warptool  = can_run('warptool') or (warn "Can't find warptool" and $missing_tools = 1);
    59 if ($missing_tools) {
    60     warn("Can't find required tools.");
    61     exit($PS_EXIT_CONFIG_ERROR);
    62 }
     59my $ipprc = PS::IPP::Config->new() or my_die("Unable to set up", $PS_EXIT_CONFIG_ERROR); # IPP configuration
    6360
    6461my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
Note: See TracChangeset for help on using the changeset viewer.