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

« back to all changes in this revision

Viewing changes to ivle/studpath.py

  • Committer: William Grant
  • Date: 2009-05-26 03:06:53 UTC
  • Revision ID: grantw@unimelb.edu.au-20090526030653-axxawt0o5ws4icbt
Remove ivle.conf usage from ivle.studpath.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
import stat
29
29
import pysvn
30
30
 
31
 
import ivle.conf
32
31
from ivle import util
33
32
 
34
33
# Make a Subversion client object (for published)
78
77
 
79
78
    return (user, path)
80
79
 
81
 
def url_to_jailpaths(urlpath):
 
80
def url_to_jailpaths(config, urlpath):
82
81
    """Given a URL path (part of a URL query string), returns a tuple of
83
82
        * the username of the student whose directory is being browsed
84
83
        * the absolute path where the jail will be located.
102
101
    (user, subpath) = util.split_path(urlpath)
103
102
    if user is None: return (None, None, None)
104
103
 
105
 
    jail = os.path.join(ivle.conf.jail_base, user)
 
104
    jail = os.path.join(config['paths']['jails']['mounts'], user)
106
105
    path = to_home_path(urlpath)
107
106
 
108
107
    return (user, jail, path)