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

« back to all changes in this revision

Viewing changes to www/apps/diff/__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:
23
23
 
24
24
import os.path
25
25
 
26
 
import conf
27
 
import common
28
 
import common.interpret
29
 
from os import path
 
26
import ivle.conf
 
27
import ivle.interpret
30
28
 
31
29
 
32
30
# handle_with_trampoline controls the way in which fileservice_lib is invoked.
41
39
# permissions issues unless all user's files are owned by the web server user.
42
40
HANDLE_WITH_TRAMPOLINE = True
43
41
 
44
 
diffservice_path = "/opt/ivle/services/diffservice"   # Within jail
 
42
diffservice_path = os.path.join(ivle.conf.share_path, 'services/diffservice')
45
43
 
46
44
def handle(req):
47
45
    """Handler for the File Services application."""
53
51
        pass
54
52
    else:
55
53
        if req.path == "":
56
 
            req.throw_redirect(path.join(req.uri,req.user.login));
57
 
        interp_object = common.interpret.interpreter_objects["cgi-python"]
58
 
        user_jail_dir = os.path.join(conf.jail_base, req.user.login)
59
 
        common.interpret.interpret_file(req, req.user.login, user_jail_dir,
 
54
            req.throw_redirect(os.path.join(req.uri,req.user.login));
 
55
        interp_object = ivle.interpret.interpreter_objects["cgi-python"]
 
56
        user_jail_dir = os.path.join(ivle.conf.jail_base, req.user.login)
 
57
        ivle.interpret.interpret_file(req, req.user.login, user_jail_dir,
60
58
            diffservice_path, interp_object)
61
59