Skip to content
Snippets Groups Projects
Commit 3ac5cafe authored by Bob Lantz's avatar Bob Lantz
Browse files

Fix code minor code check errors

parent a7ad7390
No related branches found
No related tags found
No related merge requests found
...@@ -30,12 +30,14 @@ def do_plot( self, _line ): ...@@ -30,12 +30,14 @@ def do_plot( self, _line ):
global nx, plt global nx, plt
if not nx: if not nx:
try: try:
# pylint: disable=import-error
import networkx import networkx
nx = networkx # satisfy pylint nx = networkx # satisfy pylint
from matplotlib import pyplot from matplotlib import pyplot
plt = pyplot # satisfiy pylint plt = pyplot # satisfiy pylint
import pygraphviz import pygraphviz
assert pygraphviz # silence pyflakes assert pygraphviz # silence pyflakes
# pylint: enable=import-error
except ImportError: except ImportError:
error( 'plot requires networkx, matplotlib and pygraphviz - ' error( 'plot requires networkx, matplotlib and pygraphviz - '
'please install them and try again\n' ) 'please install them and try again\n' )
......
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
import signal import signal
import select import select
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
from operator import or_
from time import sleep from time import sleep
from mininet.log import info, error, warn, debug from mininet.log import info, error, warn, debug
...@@ -1130,11 +1129,12 @@ def controllerUUIDs( self, update=False ): ...@@ -1130,11 +1129,12 @@ def controllerUUIDs( self, update=False ):
update: update cached value""" update: update cached value"""
if not self._uuids or update: if not self._uuids or update:
controllers = self.cmd( 'ovs-vsctl -- get Bridge', self, controllers = self.cmd( 'ovs-vsctl -- get Bridge', self,
'Controller' ).strip() 'Controller' ).strip()
if controllers.startswith( '[' ) and controllers.endswith( ']' ): if controllers.startswith( '[' ) and controllers.endswith( ']' ):
controllers = controllers[ 1 : -1 ] controllers = controllers[ 1 : -1 ]
if controllers: if controllers:
self._uuids = [ c.strip() for c in controllers.split( ',' ) ] self._uuids = [ c.strip()
for c in controllers.split( ',' ) ]
return self._uuids return self._uuids
def connected( self ): def connected( self ):
......
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