~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/console/service.py

  • Committer: David Coles
  • Date: 2010-02-26 12:33:21 UTC
  • Revision ID: coles.david@gmail.com-20100226123321-9v46hs5xhqv1bg21
console: Fix up crash do to passing unixid rather than User when restarting a console that has timed out

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
                                 req.user.login)
80
80
        # Within Jail
81
81
        working_dir = os.path.join("/home", req.user.login, cwd)
82
 
        uid = req.user.unixid
83
82
 
84
83
        # XXX: JSONRESTView should do this for us.
85
84
        text = text.decode('utf-8')
100
99
        except socket.error, (enumber, estring):
101
100
            if enumber == errno.ECONNREFUSED:
102
101
                # Timeout: Restart the session
103
 
                response = restart_console(req.config, uid, jail_path,
 
102
                response = restart_console(req.config, req.user, jail_path,
104
103
                    working_dir,
105
104
                    "Timed out due to inactivity")
106
105
            elif enumber == errno.ECONNRESET:
107
106
                # Communication issue: Restart the session
108
 
                response = restart_console(req.config, uid, jail_path,
 
107
                response = restart_console(req.config, req.user, jail_path,
109
108
                    working_dir,
110
109
                    "Connection reset")
111
110
            else: