IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11497


Ignore:
Timestamp:
Jan 31, 2007, 1:41:36 PM (19 years ago)
Author:
eugene
Message:

adding double-check on camera

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-Config/lib/PS/IPP/Config.pm

    r11400 r11497  
    11# Copyright (c) 2006  Paul Price, Joshua Hoblitt
    22#
    3 # $Id: Config.pm,v 1.24 2007-01-30 00:41:06 price Exp $
     3# $Id: Config.pm,v 1.25 2007-01-31 23:41:36 eugene Exp $
    44
    55package PS::IPP::Config;
     
    108108        }
    109109    }
    110     croak "Unable to find camera configuration file $filename\n"
    111         if not defined $found;
     110    if (not defined $found) {
     111        ## try again after a moment?
     112        system ("df");
     113        select(undef, undef, undef, 0.25);
     114
     115        ## try a second time
     116        my $found;
     117        foreach my $path (@path) {
     118            print "trying: filename: $filename, path: $path -> ";
     119            my $test = File::Spec->rel2abs( $filename, $path );
     120            print "test: $test\n";
     121            if (-f $test) {
     122                $found = $test;
     123                last;
     124            }
     125        }
     126        croak "Unable to find camera configuration file $filename\n" if not defined $found;
     127    }
    112128
    113129    # Read the file
Note: See TracChangeset for help on using the changeset viewer.