Changeset 1327 for trunk/LATMOS-Accounts


Ignore:
Timestamp:
04/16/15 18:23:11 (9 years ago)
Author:
nanardon
Message:

trap non existant host while renaming

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql.pm

    r1318 r1327  
    355355    my ($self, $nethostname, $to, %config) = @_; 
    356356    { 
    357         my $obj = $self->get_object('nethost', $nethostname); 
     357        my $obj = $self->get_object('nethost', $nethostname) or do { 
     358            $self->log(LA_ERR, 'Unable to rename non exisant host %s', $nethostname); 
     359            return; 
     360        }; 
    358361        $obj->_delAttributeValue(cname => $to); 
    359362    } 
Note: See TracChangeset for help on using the changeset viewer.