IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18086


Ignore:
Timestamp:
Jun 11, 2008, 3:35:08 PM (18 years ago)
Author:
eugene
Message:

test for undefined neb path

File:
1 edited

Legend:

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

    r17970 r18086  
    11# Copyright (c) 2006  Paul Price, Joshua Hoblitt
    22#
    3 # $Id: Config.pm,v 1.89 2008-06-07 02:35:39 bills Exp $
     3# $Id: Config.pm,v 1.90 2008-06-12 01:35:08 eugene Exp $
    44
    55package PS::IPP::Config;
     
    373373    if ($scheme) {
    374374        $scheme = lc($scheme);
     375        # print "scheme: $scheme\n";
    375376
    376377        if ($scheme eq 'neb') {
     
    379380            if ($create_if_doesnt_exist) {
    380381                unless ($neb->stat( $name )) {
     382                    # print "entry $name not found, creating...\n";
    381383                    my $uri = $neb->create( $name );
    382384                    unless(defined $uri) {
     
    385387                    }
    386388                    my $path = URI->new( $uri )->path;
     389                    # print "created path: $path\n";
    387390                    return $path;
    388391                }
    389392            }
    390             return $neb->find( $name );
    391         }
     393            my $path = $neb->find( $name );
     394            if (not defined $path) {
     395                carp "neb entry $name not found, not created\n";
     396                exit($PS_EXIT_DATA_ERROR);
     397            }
     398            # print "found path: $path\n";
     399            return $path;
     400        }
     401
    392402        if ($scheme eq 'path' or $scheme eq 'file') {
    393403            # guaranteed to have a scheme (path:// or file://)
    394404            $name = $self->convert_filename_absolute( $name );
     405            # print "resolved path to $name\n";
    395406        }
    396407    }
     
    408419        open F, ">$name" or die "failed to create $name";
    409420        close F;
     421        # print "created target $name\n";
    410422    }
    411423
Note: See TracChangeset for help on using the changeset viewer.