From 70b899296f425590e3712260065ac5112f64e983 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 24 Oct 2008 16:10:52 -0700 Subject: Better message on missing bandwidth Bugfix 3834 Rather than "is not a valid bandwidth", say "bandwidth must be defined for ..." --- scripts/VyattaQosTrafficLimiter.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts') 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"); -- cgit v1.2.3