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

« back to all changes in this revision

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

  • Committer: William Grant
  • Date: 2009-04-28 08:17:26 UTC
  • Revision ID: grantw@unimelb.edu.au-20090428081726-7h8fyjclxtydjma0
No more ivle.conf in ivle.webapp.fileservice...

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
import ivle.console
33
33
import ivle.chat
34
 
import ivle.conf
35
34
from ivle.webapp.base.rest import JSONRESTView, named_operation
36
35
from ivle.webapp.errors import BadRequest
37
36
 
51
50
        uid = req.user.unixid
52
51
 
53
52
        # Start the server
54
 
        jail_path = os.path.join(ivle.conf.jail_base, req.user.login)
 
53
        jail_path = os.path.join(req.config['paths']['jails']['mounts'],
 
54
                                 req.user.login)
55
55
        cons = ivle.console.Console(uid, jail_path, working_dir)
56
56
 
57
57
        # Assemble the key and return it. Yes, it is double-encoded.
76
76
        except KeyError:
77
77
            raise BadRequest("Invalid console key.")
78
78
 
79
 
        jail_path = os.path.join(ivle.conf.jail_base, req.user.login)
 
79
        jail_path = os.path.join(req.config['paths']['jails']['mounts'],
 
80
                                 req.user.login)
80
81
        working_dir = os.path.join("/home", req.user.login)   # Within jail
81
82
        uid = req.user.unixid
82
83