#NEWLINE# def delete_tc( self ) : #NEWLINE# #INDENT# return_code_list = [ ] #NEWLINE# command_list = [ ( 'tc qdisc del dev %s root' % self . __device ) , ( 'tc qdisc del dev %s ingress' % self . __device ) , ( 'tc qdisc del dev %s root' % self . ifb_device ) , ( 'ip link set dev %s down' % self . ifb_device ) , ( 'ip link delete %s type ifb' % self . ifb_device ) ] #NEWLINE# for command in command_list : #NEWLINE# #INDENT# proc = self . __subproc_wrapper . popen_command ( command ) #NEWLINE# ( _stdout , _stderr ) = proc . communicate ( ) #NEWLINE# return_code_list . append ( ( proc . returncode != 0 ) ) #NEWLINE# #UNINDENT# return ( ( - 1 ) if all ( return_code_list ) else 0 )