catch error in delete_course management script when group does not exist

This commit is contained in:
ichuang
2013-08-13 08:46:21 -04:00
parent 4f321897df
commit 03bcd19b8d

View File

@@ -48,4 +48,7 @@ class Command(BaseCommand):
print 'removing User permissions from course....'
# in the django layer, we need to remove all the user permissions groups associated with this course
if commit:
_delete_course_group(loc)
try:
_delete_course_group(loc)
except Exception as err:
print("Error in deleting course groups for {0}: {1}".format(loc, err))