Commit 09c1f524 by Carlos Andrés Rocha

Merge pull request #5820 from rocha/dont-raise-error-on-course-export-command-cleanup

Ignore errors during cleanup of course export command.
parents 9610c3b2 6ad235f5
......@@ -72,7 +72,7 @@ def export_course_to_tarfile(course_key, filename):
course_dir = export_course_to_directory(course_key, tmp_dir)
compress_directory(course_dir, filename)
finally:
shutil.rmtree(tmp_dir)
shutil.rmtree(tmp_dir, ignore_errors=True)
def export_course_to_directory(course_key, root_dir):
......@@ -83,7 +83,7 @@ def export_course_to_directory(course_key, root_dir):
raise CommandError("Invalid course_id")
# The safest characters are A-Z, a-z, 0-9, <underscore>, <period> and <hyphen>.
# We represent the first four with \w.
# We represent the first four with \w.
# TODO: Once we support courses with unicode characters, we will need to revisit this.
replacement_char = u'-'
course_dir = replacement_char.join([course.id.org, course.id.course, course.id.run])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment