Skip to content
Snippets Groups Projects
Commit a3e1a9a4 authored by lantz's avatar lantz
Browse files

Merge pull request #354 from darshanthaker/link_exception

Raise exception when link incorrectly formatted
parents 6a69c2f6 4550fff1
No related branches found
No related tags found
No related merge requests found
......@@ -279,7 +279,11 @@ def config( self, bw=None, delay=None, jitter=None, loss=None,
return
# Clear existing configuration
cmds = [ '%s qdisc del dev %s root' ]
tcoutput = self.tc( '%s qdisc show dev %s' )
if "priomap" not in tcoutput:
cmds = [ '%s qdisc del dev %s root' ]
else:
cmds = []
# Bandwidth limits via various methods
bwcmds, parent = self.bwCmds( bw=bw, speedup=speedup,
......@@ -307,6 +311,9 @@ def config( self, bw=None, delay=None, jitter=None, loss=None,
# Execute all the commands in our node
debug("at map stage w/cmds: %s\n" % cmds)
tcoutputs = [ self.tc(cmd) for cmd in cmds ]
for output in tcoutputs:
if output != '':
error( "*** Error: %s" % output )
debug( "cmds:", cmds, '\n' )
debug( "outputs:", tcoutputs, '\n' )
result[ 'tcoutputs'] = tcoutputs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment