Skip to content
Snippets Groups Projects
Commit 4550fff1 authored by Darshan Thaker's avatar Darshan Thaker
Browse files

Raise exception when link incorrectly formatted

parent 161e7997
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