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

« back to all changes in this revision

Viewing changes to bin/ivle-fetchsubmissions

  • Committer: Matt Giuca
  • Date: 2009-05-12 14:36:08 UTC
  • mto: This revision was merged to the branch mainline in revision 1247.
  • Revision ID: matt.giuca@gmail.com-20090512143608-94oi7lkkzoougv09
ivle/util.py: Added safe_rmtree, copied from Python2.6 shutil.rmtree (which
    has a bugfix to avoid following symlinks). Don't use shutil.rmtree.
bin/ivle-fetchsubmissions: Replaced call to shutil.rmtree with safe_rmtree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 
42
42
import ivle.config
43
43
import ivle.database
 
44
import ivle.util
44
45
 
45
46
from ivle.database import Project, ProjectSet, Offering, Subject
46
47
 
79
80
    if zip:
80
81
        make_zip(target_final, target_final + ".zip")
81
82
        # Remove the target tree
82
 
        shutil.rmtree(target_final)
 
83
        ivle.util.safe_rmtree(target_final)
83
84
 
84
85
def get_repo_url(submission, config):
85
86
    """Gets a local (file:) URL to the repository for a given submission.