Don't bother checking for negative delay/jitter
It's kind of pointless. However technically the argument should be a number and not a string - it's always in ms.
This commit is contained in:
+1
-5
@@ -285,11 +285,7 @@ class TCIntf( Intf ):
|
|||||||
loss=None, max_queue_size=None ):
|
loss=None, max_queue_size=None ):
|
||||||
"Internal method: return tc commands for delay and loss"
|
"Internal method: return tc commands for delay and loss"
|
||||||
cmds = []
|
cmds = []
|
||||||
if delay and delay < 0:
|
if loss and ( loss < 0 or loss > 100 ):
|
||||||
error( 'Negative delay', delay, '\n' )
|
|
||||||
elif jitter and jitter < 0:
|
|
||||||
error( 'Negative jitter', jitter, '\n' )
|
|
||||||
elif loss and ( loss < 0 or loss > 100 ):
|
|
||||||
error( 'Bad loss percentage', loss, '%%\n' )
|
error( 'Bad loss percentage', loss, '%%\n' )
|
||||||
else:
|
else:
|
||||||
# Delay/jitter/loss/max queue size
|
# Delay/jitter/loss/max queue size
|
||||||
|
|||||||
Reference in New Issue
Block a user