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

« back to all changes in this revision

Viewing changes to lib/fileservice_lib/action.py

  • Committer: mattgiuca
  • Date: 2008-06-10 11:29:07 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:760
scripts/usrmgt-server: Robustified the code which creates the user's
    individual conf.py file. (Previously would throw an exception if it didn't
    already exist (?) or if template conf.py couldn't be found, which would
    kill the whole user creation process.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
355
355
    for datum in data:
356
356
        # Each of the uploaded files
357
357
        filepath = os.path.join(path, datum.filename)
358
 
        filedata = datum.file
 
358
        filedata = datum.value
359
359
 
360
360
        if unpack and datum.filename.lower().endswith(".zip"):
361
361
            # A zip file - unpack it instead of just copying
363
363
            # Note: Just unzip into the current directory (ignore the
364
364
            # filename)
365
365
            try:
366
 
                # First get the entire path (within jail)
367
 
                _, _, abspath = studpath.url_to_jailpaths(path)
368
 
                abspath = os.path.join(os.sep, abspath)
369
 
                zip.unzip(abspath, filedata)
 
366
                zip.unzip(path, filedata)
370
367
            except (OSError, IOError):
371
368
                goterror = True
372
369
        else: