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

« back to all changes in this revision

Viewing changes to www/apps/server/__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:
24
24
# for python files, we evaluate the python script inside
25
25
# our safe execution environment.
26
26
 
27
 
from common import (util, studpath, interpret)
28
 
import conf
29
 
import conf.app.server
30
 
 
31
27
import os
32
28
import mimetypes
33
29
 
34
 
serveservice_path = "/opt/ivle/services/serveservice"
35
 
interpretservice_path = "/opt/ivle/services/interpretservice"
 
30
from ivle import (util, studpath, interpret)
 
31
import ivle.conf
 
32
 
 
33
serveservice_path = os.path.join(ivle.conf.share_path, 'services/serveservice')
 
34
interpretservice_path = os.path.join(ivle.conf.share_path,
 
35
                                     'services/interpretservice')
36
36
 
37
37
# Serve all files as application/octet-stream so the browser presents them as
38
38
# a download.
86
86
    # We need a no-op trampoline run to ensure that the jail is mounted.
87
87
    # Otherwise we won't be able to authorise for public mode!
88
88
    noop_object = interpret.interpreter_objects["noop"]
89
 
    user_jail_dir = os.path.join(conf.jail_base, owner)
 
89
    user_jail_dir = os.path.join(ivle.conf.jail_base, owner)
90
90
    interpret.interpret_file(req, owner, user_jail_dir, '', noop_object)
91
91
 
92
92
    # Authorize access. If failure, this throws a HTTP_FORBIDDEN error.