X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/3c2392c9ed9aae4fd4a86bd3e230cb05a7c229d2..0dad430c014913f47e900590cae35bf238a625e5:/code/main.py diff --git a/code/main.py b/code/main.py index 10e282f..77646c9 100755 --- a/code/main.py +++ b/code/main.py @@ -407,7 +407,7 @@ console will suffer artifacts. return d @cherrypy.expose - def at(self, machine_id, k=None, c=0): + def at(self, machine_id, k=None, c=0, force=0): machine = validation.Validate(cherrypy.request.login, cherrypy.request.state, machine_id=machine_id).machine if machine_id in self.atsessions: term = self.atsessions[machine_id] @@ -419,11 +419,12 @@ console will suffer artifacts. if k: self.atmulti.proc_write(term,k) time.sleep(0.002) - dump=self.atmulti.dump(term,c) + dump=self.atmulti.dump(term,c,int(force)) cherrypy.response.headers['Content-Type']='text/xml' if isinstance(dump,str): return dump else: + print "Removing session for", machine_id del self.atsessions[machine_id] return ''