def make(self, *args, **kwargs):
if not is_logged_in:
raise cherrypy.HTTPError(401)
# cd into the target directory
sesh_id = os.path.basename(cherrypy.request.cookie["sesh_id"].value)
rate_limited_long(sesh_id)
errored = False
try:
output = subprocess.check_output (["make"], cwd=HOME+sesh_id, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
output = e.output
errored = True
fl = open(HOME+sesh_id+"/build.log", "w")
fl.write(output);
fl.close()
if errored:
raise cherrypy.HTTPError(422)
return output
评论列表
文章目录