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

« back to all changes in this revision

Viewing changes to bin/ivle-fetchsubmissions

ivle-fetchsubmissions: Added error handling for each submission (so as not to
    kill the whole process).

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
        os.makedirs(target_dir)
201
201
 
202
202
    for submission in project.latest_submissions:
203
 
        fetch_submission(submission, target_dir, svnclient, config)
 
203
        try:
 
204
            fetch_submission(submission, target_dir, svnclient, config)
 
205
        except Exception, e:
 
206
            # Catch all exceptions (to ensure if one student has a problem, it
 
207
            # is reported, and we can continue)
 
208
            print >>sys.stderr, "%s: %s: %s" % (
 
209
                submission.assessed.principal.display_name,
 
210
                type(e).__name__, e)
204
211
 
205
212
if __name__ == "__main__":
206
213
    sys.exit(main(sys.argv))