summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-10-24 16:10:52 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-10-24 16:10:52 -0700
commit70b899296f425590e3712260065ac5112f64e983 (patch)
treea1598940c3599c63ec71f90c52c68227da348144
parent74bdb15b4e321143e4d19583b6c572a4b6ed28f1 (diff)
downloadvyatta-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.pm7
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");