Revision 0a9ea29f cleanup

View differences:

cleanup
31 31
   print "*** Removing all links of the pattern foo-ethX"
32 32
   links = sh( "ip link show | egrep -o '(\w+-eth\w+)'" ).split( '\n' )
33 33
   for link in links: 
34
      if link: sh( "ip link del " + link )
34
      if link != '': sh( "ip link del " + link )
35 35

  
36 36
   print "*** Removing excess controllers/ofprotocols/ofdatapaths/pings/noxes"
37 37
   zombies = 'controller ofprotocol ofdatapath ping nox_core lt-nox_core'
......
43 43
   print "*** Removing excess kernel datapaths"
44 44
   dps = sh( "ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/'" ).split( '\n')
45 45
   for dp in dps: 
46
      if dp: sh( 'ip link del ' + link )
46
      if dp != '': sh( 'ip link del ' + link )
47 47

  
48 48
   print "*** Removing junk from /tmp"
49 49
   sh( 'rm -f /tmp/vconn* /tmp/vlogs* /tmp/*.out /tmp/*.log' )

Also available in: Unified diff