[ONOS-7104]: Fixing style check errors in core dir of TestON
Change-Id: Ia50ae6542b141ebe857d3c42b52bd165969664e6
diff --git a/TestON/core/teston.py b/TestON/core/teston.py
index 89315dc..6794564 100644
--- a/TestON/core/teston.py
+++ b/TestON/core/teston.py
@@ -110,19 +110,19 @@
verifyOptions( options )
load_logger()
self.componentDictionary = {}
- self.componentDictionary = self.topology['COMPONENT']
+ self.componentDictionary = self.topology[ 'COMPONENT' ]
self.driversList = []
- if isinstance( self.componentDictionary, str):
+ if isinstance( self.componentDictionary, str ):
self.componentDictionary = dict( self.componentDictionary )
for component in self.componentDictionary:
- self.driversList.append( self.componentDictionary[component]['type'] )
+ self.driversList.append( self.componentDictionary[ component ][ 'type' ] )
self.driversList = list( set( self.driversList ) ) # Removing duplicates.
# Checking the test_target option set for the component or not
if isinstance( self.componentDictionary, dict ):
for component in self.componentDictionary.keys():
- if 'test_target' in self.componentDictionary[component].keys():
+ if 'test_target' in self.componentDictionary[ component ].keys():
self.test_target = component
# Checking for the openspeak file and test script
@@ -136,12 +136,12 @@
components_connect_order = {}
if isinstance( self.componentDictionary, dict ):
for component in self.componentDictionary.keys():
- if 'connect_order' not in self.componentDictionary[component].keys():
- self.componentDictionary[component]['connect_order'] = str( self.get_random() )
- components_connect_order[component] = eval( self.componentDictionary[component]['connect_order'] )
+ if 'connect_order' not in self.componentDictionary[ component ].keys():
+ self.componentDictionary[ component ][ 'connect_order' ] = str( self.get_random() )
+ components_connect_order[ component ] = eval( self.componentDictionary[ component ][ 'connect_order' ] )
# Ordering components based on the connect order.
ordered_component_list = sorted( components_connect_order,
- key=lambda key: components_connect_order[key] )
+ key=lambda key: components_connect_order[ key ] )
print ordered_component_list
for component in ordered_component_list:
self.componentInit( component )
@@ -169,40 +169,37 @@
self.initiated = False
self.log.info( "Creating component Handle: " + component )
driver_options = {}
- if 'COMPONENTS' in self.componentDictionary[component].keys():
- driver_options = dict( self.componentDictionary[component]['COMPONENTS'] )
- driver_options['name'] = component
- driverName = self.componentDictionary[component]['type']
- driver_options['type'] = driverName
+ if 'COMPONENTS' in self.componentDictionary[ component ].keys():
+ driver_options = dict( self.componentDictionary[ component ][ 'COMPONENTS' ] )
+ driver_options[ 'name' ] = component
+ driverName = self.componentDictionary[ component ][ 'type' ]
+ driver_options[ 'type' ] = driverName
classPath = self.getDriverPath( driverName.lower() )
driverModule = importlib.import_module( classPath )
driverClass = getattr( driverModule, driverName )
driverObject = driverClass()
- if "OCN" in self.componentDictionary[component]['host'] and\
+ if "OCN" in self.componentDictionary[ component ][ 'host' ] and\
main.onoscell:
- self.componentDictionary[component]['host'] = main.mnIP
+ self.componentDictionary[ component ][ 'host' ] = main.mnIP
- user_name = self.componentDictionary[component].get( 'user',
- getpass.getuser() )
- ip_address = self.componentDictionary[component].get( 'host',
- 'localhost' )
- pwd = self.componentDictionary[component].get( 'password',
- 'changeme' )
- port = self.componentDictionary[component].get( 'port' )
+ user_name = self.componentDictionary[ component ].get( 'user', getpass.getuser() )
+ ip_address = self.componentDictionary[ component ].get( 'host', 'localhost' )
+ pwd = self.componentDictionary[ component ].get( 'password', 'changeme' )
+ port = self.componentDictionary[ component ].get( 'port' )
connect_result = driverObject.connect( user_name=user_name,
ip_address=ip_address,
pwd=pwd,
port=port,
- options=driver_options)
+ options=driver_options )
if not connect_result:
self.log.error( "Exiting from the test execution because connecting to the " +
component + " component failed." )
self.exit()
- vars( self )[component] = driverObject
+ vars( self )[ component ] = driverObject
self.initiated = True
return driverObject
@@ -270,12 +267,12 @@
self.CASERESULT = self.NORESULT
stopped = False
try:
- self.code[self.testCaseNumber]
+ self.code[ self.testCaseNumber ]
except KeyError:
self.log.error( "There is no Test-Case " + self.testCaseNumber )
return self.FALSE
self.stepCount = 0
- while self.stepCount < len( self.code[self.testCaseNumber].keys() ):
+ while self.stepCount < len( self.code[ self.testCaseNumber ].keys() ):
result = self.runStep( self.code, self.testCaseNumber )
if result == self.FALSE:
break
@@ -299,7 +296,7 @@
self.CASERESULT = self.TRUE
else:
self.CASERESULT = self.NORESULT
- self.testCaseResult[str( self.CurrentTestCaseNumber )] = self.CASERESULT
+ self.testCaseResult[ str( self.CurrentTestCaseNumber ) ] = self.CASERESULT
self.organizeResult( self.CurrentTestCaseNumber, self.CASERESULT )
self.logger.updateCaseResults( self )
self.log.wiki( "<p>" + self.caseExplanation + "</p>" )
@@ -350,7 +347,7 @@
# NOTE: This is needed to catch results of main.step()'s
# called inside functions or loops
self.stepResults = ( [], [], [], [] )
- exec code[testCaseNumber][step] in module.__dict__
+ exec code[ testCaseNumber ][ step ] in module.__dict__
self.stepCount = self.stepCount + 1
self.parseStepResults( testCaseNumber )
except SkipCase: # Raised in self.skipCase()
@@ -363,7 +360,7 @@
return self.FALSE
except StandardError as e:
try:
- stepNo = self.stepResults[0][ self.stepNumber - 1 ]
+ stepNo = self.stepResults[ 0 ][ self.stepNumber - 1 ]
except IndexError:
stepNo = "<IndexError>"
main.log.warn( "Error trying to get step number. " +
@@ -371,7 +368,7 @@
str( self.stepNumber ) + " and step " +
str( self.stepNumber + 1 ) )
try:
- stepName = self.stepResults[1][ self.stepNumber - 1 ]
+ stepName = self.stepResults[ 1 ][ self.stepNumber - 1 ]
except IndexError:
stepName = "<IndexError>"
self.log.error( "\nException in the following section of" +
@@ -401,7 +398,7 @@
if cli.stop:
cli.stop = False
self.TOTAL_TC_NORESULT = self.TOTAL_TC_NORESULT + 1
- self.testCaseResult[str( self.CurrentTestCaseNumber )] = "Stopped"
+ self.testCaseResult[ str( self.CurrentTestCaseNumber ) ] = "Stopped"
self.logger.updateCaseResults( self )
result = self.cleanup()
return self.FALSE
@@ -412,12 +409,12 @@
"""
try:
# Iterate through each of the steps and print them
- for index in range( len( self.stepResults[0] ) ):
+ for index in range( len( self.stepResults[ 0 ] ) ):
# stepResults = ( stepNo, stepName, stepResult, onFail )
- stepNo = self.stepResults[0][ index ]
- stepName = self.stepResults[1][ index ]
- stepResult = self.stepResults[2][ index ]
- onFail = self.stepResults[3][ index ]
+ stepNo = self.stepResults[ 0 ][ index ]
+ stepName = self.stepResults[ 1 ][ index ]
+ stepResult = self.stepResults[ 2 ][ index ]
+ onFail = self.stepResults[ 3 ][ index ]
self.stepCache += "\t" + str( testCaseNumber ) + "."
self.stepCache += str( stepNo ) + " "
self.stepCache += stepName + " - "
@@ -454,27 +451,27 @@
raise SkipCase
def addCaseHeader( self ):
- caseHeader = "\n" + "*" * 30 + "\n Result summary for Testcase" +\
+ caseHeader = "\n" + "*" * 30 + "\n Result summary for Testcase" + \
str( self.CurrentTestCaseNumber ) + "\n" + "*" * 30 + "\n"
self.log.exact( caseHeader )
- caseHeader = "\n" + "*" * 40 + "\nStart of Test Case" +\
+ caseHeader = "\n" + "*" * 40 + "\nStart of Test Case" + \
str( self.CurrentTestCaseNumber ) + " : "
for driver in self.componentDictionary.keys():
- vars( self )[driver + 'log'].info( caseHeader )
+ vars( self )[ driver + 'log' ].info( caseHeader )
def addCaseFooter( self ):
- stepNo = self.stepResults[0][-2]
+ stepNo = self.stepResults[ 0 ][ -2 ]
if stepNo > 0:
- previousStep = " " + str( self.CurrentTestCaseNumber ) + "." +\
+ previousStep = " " + str( self.CurrentTestCaseNumber ) + "." + \
str( stepNo ) + ": " + str( self.stepName )
- stepHeader = "\n" + "*" * 40 + "\nEnd of Step " + previousStep +\
+ stepHeader = "\n" + "*" * 40 + "\nEnd of Step " + previousStep + \
"\n" + "*" * 40 + "\n"
- caseFooter = "\n" + "*" * 40 + "\nEnd of Test case " +\
+ caseFooter = "\n" + "*" * 40 + "\nEnd of Test case " + \
str( self.CurrentTestCaseNumber ) + "\n" + "*" * 40 + "\n"
for driver in self.driversList:
- vars( self )[driver].write( stepHeader + "\n" + caseFooter )
+ vars( self )[ driver ].write( stepHeader + "\n" + caseFooter )
def cleanup( self ):
'''
@@ -497,12 +494,12 @@
self.logger.testSummary( self )
components = self.componentDictionary
for component in sorted( components,
- key=lambda item: components[item]['connect_order'],
+ key=lambda item: components[ item ][ 'connect_order' ],
reverse=True ):
try:
- tempObject = vars( self )[component]
- print "Disconnecting from " + str( tempObject.name ) +\
- ": " + str( tempObject.__class__)
+ tempObject = vars( self )[ component ]
+ print "Disconnecting from " + str( tempObject.name ) + \
+ ": " + str( tempObject.__class__ )
tempObject.disconnect()
except KeyboardInterrupt:
pass
@@ -517,7 +514,7 @@
# Closing all the driver's session files
for driver in self.componentDictionary.keys():
try:
- vars( self )[driver].close_log_handles()
+ vars( self )[ driver ].close_log_handles()
except KeyboardInterrupt:
pass
except KeyError:
@@ -556,7 +553,7 @@
if not components:
try:
for component in self.componentDictionary.keys():
- tempObject = vars( self )[component]
+ tempObject = vars( self )[ component ]
result = tempObject.onfail()
except StandardError as e:
print str( e )
@@ -564,7 +561,7 @@
else:
try:
for component in components:
- tempObject = vars( self )[component]
+ tempObject = vars( self )[ component ]
result = tempObject.onfail()
except StandardError as e:
print str( e )
@@ -605,25 +602,25 @@
'''
The step information of the test-case will append to the logs.
'''
- previousStep = " " + str( self.CurrentTestCaseNumber ) + "." +\
+ previousStep = " " + str( self.CurrentTestCaseNumber ) + "." + \
str( self.stepNumber ) + ": " + str( self.stepName )
self.stepName = stepDesc
self.stepNumber += 1
- self.stepResults[0].append( self.stepNumber )
- self.stepResults[1].append( stepDesc )
- self.stepResults[2].append( self.NORESULT )
- self.stepResults[3].append( "No on fail message given" )
+ self.stepResults[ 0 ].append( self.stepNumber )
+ self.stepResults[ 1 ].append( stepDesc )
+ self.stepResults[ 2 ].append( self.NORESULT )
+ self.stepResults[ 3 ].append( "No on fail message given" )
- stepName = " " + str( self.CurrentTestCaseNumber ) + "." +\
+ stepName = " " + str( self.CurrentTestCaseNumber ) + "." + \
str( self.stepNumber ) + ": " + str( stepDesc )
- self.log.step(stepName)
+ self.log.step( stepName )
stepHeader = ""
line = "\n" + "-" * 45 + "\n"
if self.stepNumber > 1:
stepHeader = line + "End of Step " + previousStep + line
stepHeader += line + "Start of Step" + stepName + line
for driver in self.componentDictionary.keys():
- vars( self )[driver + 'log'].info( stepHeader )
+ vars( self )[ driver + 'log' ].info( stepHeader )
def case( self, testCaseName ):
'''
@@ -634,7 +631,7 @@
self.log.case( testCaseName )
caseHeader = testCaseName + "\n" + "*" * 40 + "\n"
for driver in self.componentDictionary.keys():
- vars( self )[driver + 'log'].info( caseHeader )
+ vars( self )[ driver + 'log' ].info( caseHeader )
def testDesc( self, description ):
'''
@@ -654,7 +651,7 @@
counter = 0
for index in range( len( testFileList ) ):
lineMatch = re.match( '\s+def CASE(\d+)(.*):',
- testFileList[index],
+ testFileList[ index ],
0 )
if lineMatch:
counter = counter + 1
@@ -721,7 +718,7 @@
table format'''
table_data = ""
if isinstance( value_to_convert, dict ):
- table_data = table_data + '\t'.join( value_to_convert ) +\
+ table_data = table_data + '\t'.join( value_to_convert ) + \
"\n"
for temp_val in value_to_convert.values():
table_data = table_data + get_table( temp_val )
@@ -770,7 +767,7 @@
# NOTE: We should catch any exceptions while trying to
# close the thread so that we can try to close the other
# threads as well
- print str( thread.getName() ) +\
+ print str( thread.getName() ) + \
' could not be terminated'
os.system( "stty sane" ) # fix format if necessary
sys.exit()
@@ -859,16 +856,16 @@
# Mail-To: field
if options.mail: # Test run specific
main.mail = options.mail
- elif main.params.get('mail'): # Test suite specific
+ elif main.params.get( 'mail' ): # Test suite specific
main.mail = main.params.get( 'mail' )
else: # TestON specific
- main.mail = main.config['config'].get( 'mail_to' )
+ main.mail = main.config[ 'config' ].get( 'mail_to' )
# Mail-From: field
- main.sender = main.config['config'].get( 'mail_from' )
+ main.sender = main.config[ 'config' ].get( 'mail_from' )
# Mail smtp server
- main.smtp = main.config['config'].get( 'mail_server' )
+ main.smtp = main.config[ 'config' ].get( 'mail_server' )
# Mail-From account password
- main.senderPwd = main.config['config'].get( 'mail_pass' )
+ main.senderPwd = main.config[ 'config' ].get( 'mail_pass' )
def evalTestCase( tempList ):
tList = []
@@ -876,7 +873,7 @@
if isinstance( tcase, list ):
tList.extend( evalTestCase( tcase ) )
else:
- tList.extend( [tcase] )
+ tList.extend( [ tcase ] )
return tList
def verifyTestCases( options ):
@@ -888,10 +885,10 @@
main.testcases_list = eval( testcases_list + "," )
else:
if 'testcases' in main.params.keys():
- temp = eval( main.params['testcases'] + "," )
+ temp = eval( main.params[ 'testcases' ] + "," )
main.testcases_list = evalTestCase( list( temp ) )
else:
- print "Testcases not specifed in params, please provide in " +\
+ print "Testcases not specifed in params, please provide in " + \
"params file or 'testcases' commandline argument"
sys.exit()
@@ -902,20 +899,20 @@
main.ONOSip = []
main.mnIP = ""
cellCMD = ". ~/onos/tools/dev/bash_profile; cell " + main.onoscell
- output = subprocess.check_output( ["bash", '-c', cellCMD] )
+ output = subprocess.check_output( [ "bash", '-c', cellCMD ] )
splitOutput = output.splitlines()
main.apps = ""
for i in range( len( splitOutput ) ):
- if re.match( "OCN", splitOutput[i] ):
- mnNode = splitOutput[i].split( "=" )
- main.mnIP = mnNode[1]
+ if re.match( "OCN", splitOutput[ i ] ):
+ mnNode = splitOutput[ i ].split( "=" )
+ main.mnIP = mnNode[ 1 ]
# cell already sorts OC variables in bash, so no need to
# sort in TestON
- elif re.match( "OC[1-9]", splitOutput[i] ):
- onosNodes = splitOutput[i].split( "=" )
- main.ONOSip.append( onosNodes[1] )
- elif re.match( "ONOS_APPS", splitOutput[i] ):
- main.apps = ( splitOutput[i].split( "=" ) )[1]
+ elif re.match( "OC[1-9]", splitOutput[ i ] ):
+ onosNodes = splitOutput[ i ].split( "=" )
+ main.ONOSip.append( onosNodes[ 1 ] )
+ elif re.match( "ONOS_APPS", splitOutput[ i ] ):
+ main.apps = ( splitOutput[ i ].split( "=" ) )[ 1 ]
else:
main.onoscell = main.FALSE
@@ -929,13 +926,13 @@
pass
else:
directory = ""
- for root, dirs, files in os.walk( main.testDir, topdown=True):
+ for root, dirs, files in os.walk( main.testDir, topdown=True ):
if not directory:
for name in dirs:
if name == main.TEST:
directory = ( os.path.join( root, name ) )
index = directory.find( "/tests/" ) + 1
- main.classPath = directory[index:].replace( '/', '.' ) + "." + main.TEST
+ main.classPath = directory[ index: ].replace( '/', '.' ) + "." + main.TEST
break
openspeakfile = directory + "/" + main.TEST + ".ospk"
main.testFile = directory + "/" + main.TEST + ".py"
@@ -946,8 +943,8 @@
# No openspeak found, using python file instead
pass
else:
- print "\nThere is no \"" + main.TEST + "\" test script.\nPlease provide a " +\
- "Python or OpenSpeak test script in the tests folder: " +\
+ print "\nThere is no \"" + main.TEST + "\" test script.\nPlease provide a " + \
+ "Python or OpenSpeak test script in the tests folder: " + \
main.testDir + "/" + main.TEST + "/"
__builtin__.testthread = None
main.exit()
@@ -955,10 +952,10 @@
testModule = __import__( main.classPath,
globals(),
locals(),
- [main.TEST],
+ [ main.TEST ],
-1 )
except ImportError:
- print "There was an import error, it might mean that there is " +\
+ print "There was an import error, it might mean that there is " + \
"no test named " + main.TEST
main.exit()
@@ -970,19 +967,19 @@
def verifyParams( options ):
try:
- main.params = main.params['PARAMS']
+ main.params = main.params[ 'PARAMS' ]
except KeyError:
- print "Error with the params file: Either the file not specified " +\
+ print "Error with the params file: Either the file not specified " + \
"or the format is not correct"
main.exit()
try:
- main.topology = main.topology['TOPOLOGY']
+ main.topology = main.topology[ 'TOPOLOGY' ]
except KeyError:
- print "Error with the Topology file: Either the file not specified " +\
+ print "Error with the Topology file: Either the file not specified " + \
"or the format is not correct"
main.exit()
# Overwrite existing params variables if they are specified from command line
- if len(options.params) > 0:
+ if len( options.params ) > 0:
# Some params variables are specified from command line
for param in options.params:
if not re.search( ".=.", param ):
@@ -997,7 +994,7 @@
# Get the innermost dictionary
try:
while len( keyList ) > 1:
- key = keyList.pop(0)
+ key = keyList.pop( 0 )
assert isinstance( paramDict[ key ], dict )
paramDict = paramDict[ key ]
except KeyError:
@@ -1007,14 +1004,14 @@
print( "Error when parsing params: \"" + key + "\" is already the innermost level in main.params" )
main.exit()
# Change the value
- if not paramDict.has_key( keyList[0] ):
- print( "Error when parsing params: key \"" + keyList[0] + "\" not found in main.params" )
+ if keyList[ 0 ] not in paramDict:
+ print( "Error when parsing params: key \"" + keyList[ 0 ] + "\" not found in main.params" )
main.exit()
- elif isinstance( paramDict[ keyList[0] ], dict ):
- print( "Error when parsing params: more levels under key \"" + keyList[0] + "\" in main.params" )
+ elif isinstance( paramDict[ keyList[ 0 ] ], dict ):
+ print( "Error when parsing params: more levels under key \"" + keyList[ 0 ] + "\" in main.params" )
main.exit()
else:
- paramDict[ keyList[0] ] = value
+ paramDict[ keyList[ 0 ] ] = value
def load_parser():
'''
@@ -1025,20 +1022,20 @@
'''
confighash = main.configDict
- if 'file' in confighash['config']['parser'] and\
- 'class' in confighash['config']['parser']:
- path = confighash['config']['parser']['file']
+ if 'file' in confighash[ 'config' ][ 'parser' ] and\
+ 'class' in confighash[ 'config' ][ 'parser' ]:
+ path = confighash[ 'config' ][ 'parser' ][ 'file' ]
if path is not None or\
- confighash['config']['parser']['class'] is not None:
+ confighash[ 'config' ][ 'parser' ][ 'class' ] is not None:
try:
module = re.sub( r".py\s*$", "", path )
- moduleList = module.split("/")
- newModule = ".".join( moduleList[-2:] )
- parsingClass = confighash['config']['parser']['class']
+ moduleList = module.split( "/" )
+ newModule = ".".join( moduleList[ -2: ] )
+ parsingClass = confighash[ 'config' ][ 'parser' ][ 'class' ]
parsingModule = __import__( newModule,
globals(),
locals(),
- [parsingClass],
+ [ parsingClass ],
-1 )
parsingClass = getattr( parsingModule, parsingClass )
main.parser = parsingClass()
@@ -1050,11 +1047,11 @@
print "Invalid parser format"
main.exit()
except ImportError:
- print "Could not find the file " + path +\
+ print "Could not find the file " + path + \
" using default parser."
load_defaultParser()
- elif confighash['config']['parser']['file'] is None or\
- confighash['config']['parser']['class'] is None:
+ elif confighash[ 'config' ][ 'parser' ][ 'file' ] is None or\
+ confighash[ 'config' ][ 'parser' ][ 'class' ] is None:
load_defaultParser()
else:
load_defaultParser()
@@ -1064,14 +1061,14 @@
It will load the default parser which is xml parser to parse the params and
topology file.
'''
- moduleList = main.parserPath.split("/")
- newModule = ".".join( moduleList[-2:] )
+ moduleList = main.parserPath.split( "/" )
+ newModule = ".".join( moduleList[ -2: ] )
try:
parsingClass = main.parsingClass
parsingModule = __import__( newModule,
globals(),
locals(),
- [parsingClass],
+ [ parsingClass ],
-1 )
parsingClass = getattr( parsingModule, parsingClass )
main.parser = parsingClass()
@@ -1082,7 +1079,7 @@
else:
main.exit()
except ImportError:
- print sys.exc_info()[1]
+ print sys.exc_info()[ 1 ]
def load_logger():
'''
@@ -1092,29 +1089,29 @@
file.
'''
confighash = main.configDict
- if 'file' in confighash['config']['logger'] and\
- 'class' in confighash['config']['logger']:
- path = confighash['config']['logger']['file']
+ if 'file' in confighash[ 'config' ][ 'logger' ] and\
+ 'class' in confighash[ 'config' ][ 'logger' ]:
+ path = confighash[ 'config' ][ 'logger' ][ 'file' ]
if path is not None or\
- confighash['config']['logger']['class'] is not None:
+ confighash[ 'config' ][ 'logger' ][ 'class' ] is not None:
try:
module = re.sub( r".py\s*$", "", path )
moduleList = module.split( "/" )
- newModule = ".".join( moduleList[-2:] )
- loggerClass = confighash['config']['logger']['class']
+ newModule = ".".join( moduleList[ -2: ] )
+ loggerClass = confighash[ 'config' ][ 'logger' ][ 'class' ]
loggerModule = __import__( newModule,
globals(),
locals(),
- [loggerClass],
+ [ loggerClass ],
-1 )
loggerClass = getattr( loggerModule, loggerClass )
main.logger = loggerClass()
except ImportError:
- print "Could not find the file " + path +\
+ print "Could not find the file " + path + \
" using default logger."
load_defaultlogger()
- elif confighash['config']['parser']['file'] is None or\
- confighash['config']['parser']['class'] is None:
+ elif confighash[ 'config' ][ 'parser' ][ 'file' ] is None or\
+ confighash[ 'config' ][ 'parser' ][ 'class' ] is None:
load_defaultlogger()
else:
load_defaultlogger()
@@ -1124,20 +1121,20 @@
It will load the default parser which is xml parser to parse the params and
topology file.
'''
- moduleList = main.loggerPath.split("/")
- newModule = ".".join( moduleList[-2:] )
+ moduleList = main.loggerPath.split( "/" )
+ newModule = ".".join( moduleList[ -2: ] )
try:
loggerClass = main.loggerClass
loggerModule = __import__( newModule,
globals(),
locals(),
- [loggerClass],
+ [ loggerClass ],
-1 )
loggerClass = getattr( loggerModule, loggerClass )
main.logger = loggerClass()
except ImportError:
- print sys.exc_info()[1]
+ print sys.exc_info()[ 1 ]
main.exit()
def _echo( self ):