コード例 #1
0
ファイル: run.py プロジェクト: PythonCheck/pythoncheck
def run():
	buildId = runsystem.generateBuildId(BUILD_ID_LENGTH)
	project=request.vars.project
	course=request.vars.course
	main=request.vars.execute

	if len(course) == 0:
		course = None

	try:
		runsystem.invokeBuild(mode='test', buildId=buildId, main=main, project=project, course=course, userId=auth.user_id)
	except Exception, e:
		raise HTTP(500, XML(json(dict(error=T('We got an error while trying to build the project: ') + T(str(e))))))
コード例 #2
0
ファイル: run.py プロジェクト: PythonCheck/pythoncheck
def submit():
	project=request.vars.project
	course=request.vars.course
	main=request.vars.execute
	buildId = runsystem.generateBuildId(BUILD_ID_LENGTH)

	if len(course) == 0:
		raise HTTP(422, XML(json(dict(error=T('We can\'t do anything for you until you specify a course')))))

	try:
		runsystem.invokeBuild(mode='submit', buildId=buildId, project=project, course=course, main=main, userId=auth.user_id)
	except Exception, e:
		raise HTTP(500, XML(json(dict(error=T('We got an error while trying to build the project: ') + T(str(e))))))