diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-24 16:10:52 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-24 16:10:52 -0700 |
commit | 70b899296f425590e3712260065ac5112f64e983 (patch) | |
tree | a1598940c3599c63ec71f90c52c68227da348144 | |
parent | 74bdb15b4e321143e4d19583b6c572a4b6ed28f1 (diff) | |
download | vyatta-cfg-qos-70b899296f425590e3712260065ac5112f64e983.tar.gz vyatta-cfg-qos-70b899296f425590e3712260065ac5112f64e983.zip |
Better message on missing bandwidth
Bugfix 3834
Rather than "is not a valid bandwidth", say "bandwidth must be defined for ..."
-rw-r--r-- | scripts/VyattaQosTrafficLimiter.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/VyattaQosTrafficLimiter.pm b/scripts/VyattaQosTrafficLimiter.pm index 45e744e..2907590 100644 --- a/scripts/VyattaQosTrafficLimiter.pm +++ b/scripts/VyattaQosTrafficLimiter.pm @@ -47,9 +47,10 @@ my ( $self, $config ) = @_; my $level = $config->setLevel(); my @matches = (); - - $self->{rate} = VyattaQosUtil::getRate($config->returnValue("bandwidth")); - defined $self->{rate} or die "$level bandwidth not defined\n"; + my $rate = $config->returnValue("bandwidth"); + + defined $rate or die "bandwidth must be defined for $level\n"; + $self->{rate} = VyattaQosUtil::getRate($rate); $self->{priority} = $config->returnValue("priority"); |