예제 #1
0
def recordSession(param, sessionKey, searchType):
    dataFilename = "shelve/codeScanTable"  #persistent dictionary that will hold the CodeScan records
    dataTable = DataTable(
        dataFilename)  #establish connection to the persistent dataTable

    rowData = dict()
    rowData['runDate'] = str(today_date)
    rowData['searchType'] = searchType
    rowData['sessionKey'] = sessionKey
    rowData['elapsedTime'] = ''
    try:
        if param['elapsedTime'] is not None:
            rowData['elapsedTime'] = param['elapsedTime']
    except:
        pass
    rowData['top'] = ''
    try:
        if param['top'] is not None:
            rowData['top'] = param['top']
    except:
        pass
    rowData['series'] = ''
    try:
        if param['series'] is not None:
            rowData['series'] = param['series']
    except:
        pass
    rowData['label'] = ''
    try:
        if param['label'] is not None:
            rowData['label'] = param['label']
    except:
        pass
    rowData['command'] = ''
    try:
        if param['command'] is not None:
            rowData['command'] = param['command']
    except:
        pass
    rowData['commandArgument'] = ''
    try:
        if param['commandArgument'] is not None:
            rowData['commandArgument'] = param['commandArgument']
    except:
        pass
    rowData['files'] = ''
    try:
        if param['files'] is not None:
            rowData['files'] = param['files']
    except:
        pass
    rowData['contents'] = ''
    try:
        if param['contents'] is not None:
            rowData['contents'] = param['contents']
    except:
        pass
    rowData['processSize'] = ''
    try:
        if param['processSize'] is not None:
            rowData['processSize'] = param['processSize']
    except:
        pass
    rowData['container'] = ''
    try:
        if param['container'] is not None:
            rowData['container'] = param['container']
    except:
        pass
    rowData['title'] = ''
    try:
        if param['title'] is not None:
            rowData['title'] = param['title']
    except:
        pass
    rowData['commandButton'] = ''
    try:
        if param['commandButton'] is not None:
            rowData['commandButton'] = param['commandButton']
    except:
        pass
    rowData['componentName'] = ''
    try:
        if param['componentName'] is not None:
            rowData['componentName'] = param['componentName']
    except:
        pass
    rowData['tag'] = ''
    try:
        if param['tag'] is not None:
            rowData['tag'] = param['tag']
    except:
        pass
    rowData['attribute'] = ''
    try:
        if param['attribute'] is not None:
            rowData['attribute'] = param['attribute']
    except:
        pass
    rowData['attribute_value'] = ''
    try:
        if param['attribute_value'] is not None:
            rowData['attribute_value'] = param['attribute_value']
    except:
        pass

    rowNum = dataTable.insertRow(rowData)

    dataTable.closeTable()  #close the file connection
예제 #2
0
def recordSession(param, sessionKey, searchType):
	dataFilename = "shelve/codeScanTable" #persistent dictionary that will hold the CodeScan records
	dataTable = DataTable(dataFilename)	#establish connection to the persistent dataTable
	
	rowData = dict()
	rowData['runDate'] = str(today_date)
	rowData['searchType'] = searchType
	rowData['sessionKey'] = sessionKey
	rowData['elapsedTime'] = ''
	try:
		if param['elapsedTime'] is not None:
			rowData['elapsedTime'] = param['elapsedTime']		
	except:
		pass
	rowData['top'] = ''
	try:
		if param['top'] is not None:
			rowData['top'] = param['top']	
	except:
		pass
	rowData['series'] = ''
	try:
		if param['series'] is not None:
			rowData['series'] = param['series']	
	except:
		pass
	rowData['label'] = ''
	try:
		if param['label'] is not None:
			rowData['label'] = param['label']	
	except:
		pass
	rowData['command'] = ''
	try:
		if param['command'] is not None:
			rowData['command'] = param['command']	
	except:
		pass
	rowData['commandArgument'] = ''
	try:
		if param['commandArgument'] is not None:
			rowData['commandArgument'] = param['commandArgument']	
	except:
		pass
	rowData['files'] = ''
	try:
		if param['files'] is not None:
			rowData['files'] = param['files']	
	except:
		pass
	rowData['contents'] = ''
	try:
		if param['contents'] is not None:
			rowData['contents'] = param['contents']	
	except:
		pass
	rowData['processSize'] = ''
	try:
		if param['processSize'] is not None:
			rowData['processSize'] = param['processSize']	
	except:
		pass
	rowData['container'] = ''
	try:
		if param['container'] is not None:
			rowData['container'] = param['container']	
	except:
		pass
	rowData['title'] = ''
	try:
		if param['title'] is not None:
			rowData['title'] = param['title']	
	except:
		pass
	rowData['commandButton'] = ''
	try:
		if param['commandButton'] is not None:
			rowData['commandButton'] = param['commandButton']	
	except:
		pass
	rowData['componentName'] = ''
	try:
		if param['componentName'] is not None:
			rowData['componentName'] = param['componentName']	
	except:
		pass
	rowData['tag'] = ''
	try:
		if param['tag'] is not None:
			rowData['tag'] = param['tag']	
	except:
		pass
	rowData['attribute'] = ''
	try:
		if param['attribute'] is not None:
			rowData['attribute'] = param['attribute']	
	except:
		pass
	rowData['attribute_value'] = ''
	try:
		if param['attribute_value'] is not None:
			rowData['attribute_value'] = param['attribute_value']	
	except:
		pass

	rowNum = dataTable.insertRow(rowData)

	dataTable.closeTable() #close the file connection