Validate the args to SSCK

This commit is contained in:
Don Mitchell
2014-05-06 11:31:15 -04:00
parent b337d4f893
commit 69a2d9882e
3 changed files with 12 additions and 46 deletions

View File

@@ -71,6 +71,7 @@ command again, adding --insert or --delete to edit the list.
course_key = CourseKey.from_string(options['course'])
except InvalidKeyError:
course_key = SlashSeparatedCourseKey.from_deprecated_string(options['course'])
print u'Warning: you are using a deprecated format. Please use {} in the future'.format(course_key)
course = get_course_by_id(course_key)
print 'Warning: this command directly edits the list of course tabs in mongo.'