Ignore:
Timestamp:
Aug 11, 2009, 1:15:07 AM (15 years ago)
Author:
quentin
Message:

Allow reconnecting to the same terminal session

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/cherrypy/code/main.py

    r2434 r2435  
    298298
    299299        @cherrypy.expose
    300         def at(self, machine_id, k=None, c=0):
     300        def at(self, machine_id, k=None, c=0, force=0):
    301301            machine = validation.Validate(cherrypy.request.login, cherrypy.request.state, machine_id=machine_id).machine
    302302            if machine_id in self.atsessions:
     
    310310                self.atmulti.proc_write(term,k)
    311311            time.sleep(0.002)
    312             dump=self.atmulti.dump(term,c)
     312            dump=self.atmulti.dump(term,c,int(force))
    313313            cherrypy.response.headers['Content-Type']='text/xml'
    314314            if isinstance(dump,str):
    315315                return dump
    316316            else:
     317                print "Removing session for", machine_id
    317318                del self.atsessions[machine_id]
    318319                return '<?xml version="1.0"?><idem></idem>'
Note: See TracChangeset for help on using the changeset viewer.