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

« back to all changes in this revision

Viewing changes to www/apps/consoleservice/__init__.py

  • Committer: William Grant
  • Date: 2009-01-13 01:36:15 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1123
Merge setup-refactor branch. This completely breaks existing installations;
every path (both filesystem and Python) has changed. Do not upgrade without
knowing what you are doing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
import cjson
31
31
 
32
 
from common import (util, studpath, chat, console)
33
 
import conf
 
32
from ivle import (util, studpath, chat, console)
 
33
import ivle.conf
34
34
import errno
35
35
 
36
36
def handle(req):
78
78
    req.write_html_head_foot = False
79
79
 
80
80
    # Start the server
81
 
    jail_path = os.path.join(conf.jail_base, req.user.login)
 
81
    jail_path = os.path.join(ivle.conf.jail_base, req.user.login)
82
82
    cons = console.Console(uid, jail_path, working_dir)
83
83
 
84
84
    # Assemble the key and return it.
95
95
    # It simply acts as a proxy to the console server
96
96
    if req.method != "POST":
97
97
        req.throw_error(req.HTTP_BAD_REQUEST)
98
 
    jail_path = os.path.join(conf.jail_base, req.user.login)
 
98
    jail_path = os.path.join(ivle.conf.jail_base, req.user.login)
99
99
    working_dir = os.path.join("/home", req.user.login)   # Within jail
100
100
    uid = req.user.unixid
101
101
    fields = req.get_fieldstorage()