Stop catching non error throwables such as SystemExit
* Convert "except:" to "except Exception:"
* Use log.exception instead of directly calling traceback
* Remove unused imports
* Fix a typos
* Replace tabs with spaces for combatibility issues
diff --git a/TestON/drivers/common/cli/emulator/flowvisordriver.py b/TestON/drivers/common/cli/emulator/flowvisordriver.py
index d0e6ea5..46c47a7 100644
--- a/TestON/drivers/common/cli/emulator/flowvisordriver.py
+++ b/TestON/drivers/common/cli/emulator/flowvisordriver.py
@@ -21,17 +21,10 @@
FlowVisorDriver is the basic driver which will handle the Mininet functions
"""
-import pexpect
-import struct
-import fcntl
-import os
-import signal
import re
import sys
-import core.teston
sys.path.append( "../" )
from drivers.common.cli.emulatordriver import Emulator
-from drivers.common.clidriver import CLI
class FlowVisorDriver( Emulator ):
@@ -147,15 +140,15 @@
try :
if self.dl_src and self.nw_dst:
flowspace = "any 100 dl_type=0x806,dl_src="+self.dl_src+",nw_dst="+self.nw_dst+" Slice:"+self.Slice+"=4"
- except :
+ except Exception:
try :
if self.nw_src and self.tp_dst:
flowspace = "any 100 dl_type=0x800,nw_proto=6,nw_src="+self.nw_src+",tp_dst="+self.tp_dst+" Slice:"+self.Slice+"=4"
- except :
+ except Exception:
try :
if self.nw_src and self.tp_src:
flowspace = "any 100 dl_type=0x800,nw_proto=6,nw_src="+self.nw_src+",tp_src="+self.tp_dst+" Slice:"+self.Slice+"=4"
- except :
+ except Exception:
main.log.error( "Please specify flowspace properly" )
"""
# self.execute( cmd="clear",prompt="\$",timeout=10 )