Fix code minor code check errors
This commit is contained in:
@@ -30,12 +30,14 @@ class ClusterCLI( CLI ):
|
||||
global nx, plt
|
||||
if not nx:
|
||||
try:
|
||||
# pylint: disable=import-error
|
||||
import networkx
|
||||
nx = networkx # satisfy pylint
|
||||
from matplotlib import pyplot
|
||||
plt = pyplot # satisfiy pylint
|
||||
import pygraphviz
|
||||
assert pygraphviz # silence pyflakes
|
||||
# pylint: enable=import-error
|
||||
except ImportError:
|
||||
error( 'plot requires networkx, matplotlib and pygraphviz - '
|
||||
'please install them and try again\n' )
|
||||
|
||||
+3
-3
@@ -52,7 +52,6 @@ import re
|
||||
import signal
|
||||
import select
|
||||
from subprocess import Popen, PIPE
|
||||
from operator import or_
|
||||
from time import sleep
|
||||
|
||||
from mininet.log import info, error, warn, debug
|
||||
@@ -1130,11 +1129,12 @@ class OVSSwitch( Switch ):
|
||||
update: update cached value"""
|
||||
if not self._uuids or update:
|
||||
controllers = self.cmd( 'ovs-vsctl -- get Bridge', self,
|
||||
'Controller' ).strip()
|
||||
'Controller' ).strip()
|
||||
if controllers.startswith( '[' ) and controllers.endswith( ']' ):
|
||||
controllers = controllers[ 1 : -1 ]
|
||||
if controllers:
|
||||
self._uuids = [ c.strip() for c in controllers.split( ',' ) ]
|
||||
self._uuids = [ c.strip()
|
||||
for c in controllers.split( ',' ) ]
|
||||
return self._uuids
|
||||
|
||||
def connected( self ):
|
||||
|
||||
Reference in New Issue
Block a user