PEATSA/Core/Environment.py
def __validateConfiguration(self, object, errorList=None):
	
		'''Checks if object is a valid configuration object
		
		Parameters:
			object - A ConfigParser instance
			errorList - An empty list
			
		Returns:
			True if object contains all the required options.
			False otherwise.
			If False and errorList was set if contains a list of what was missing'''
		
		if errorList == None:
			errorList = []
			
		requiredSections = Configuration.requiredOptions.keys()
		
		#Check all sections are present
		#and all required options in that section are present
		for section in requiredSections:
			if object.has_section(section):
				options = object.options(section)
				required = Configuration.requiredOptions[section]
				for option in required:
					if options.count(option) == 0:
						errorList.append('Missing option %s' % option)
			else:
				errorList.append('Missing section %s' % section)
					
		if len(errorList) == 0:
			retval = True
		else:
			retval = False
		
		return retval
Checks if object is a valid configuration object
		
		Parameters:
			object - A ConfigParser instance
			errorList - An empty list
			
		Returns:
			True if object contains all the required options.
			False otherwise.
			If False and errorList was set if contains a list of what was missing
Checks if object is a valid configuration object
Parameters:
object - A ConfigParser instance
errorList - An empty list

True if object contains all the required options.
False otherwise.
If False and errorList was set if contains a list of what was missing
Checks if object is a valid configuration object Parameters : object - A ConfigParser instance errorList - An empty list True if object contains all the required options . False otherwise . If False and errorList was set if contains a list of what was missing
def __validateConfiguration(self, object, errorList=None):
		if errorList == None:
			errorList = []
		requiredSections = Configuration.requiredOptions.keys()
		for section in requiredSections:
			if object.has_section(section):
				options = object.options(section)
				required = Configuration.requiredOptions[section]
				for option in required:
					if options.count(option) == 0:
						errorList.append('Missing option %s' % option)
			else:
				errorList.append('Missing section %s' % section)
		if len(errorList) == 0:
			retval = True
		else:
			retval = False
		return retval
def __validateConfiguration ( self , object , errorList = None ) : if errorList == None : errorList = [ ] requiredSections = Configuration . requiredOptions . keys ( ) for section in requiredSections : if object . has_section ( section ) : options = object . options ( section ) required = Configuration . requiredOptions [ section ] for option in required : if options . count ( option ) == 0 : errorList . append ( 'Missing option %s' % option ) else : errorList . append ( 'Missing section %s' % section ) if len ( errorList ) == 0 : retval = True else : retval = False return retval
Checks if object is a valid configuration object
Parameters:
object - A ConfigParser instance
errorList - An empty list
Checks if object is a valid configuration object Parameters : object - A ConfigParser instance errorList - An empty list
'''Checks if object is a valid configuration object
		
		Parameters:
			object - A ConfigParser instance
			errorList - An empty list
			
		Returns:
			True if object contains all the required options.
			False otherwise.
			If False and errorList was set if contains a list of what was missing''' #Check all sections are present #and all required options in that section are present
self
object
errorList