Commit 3acff0a7 by Chris Dodge

remove unnecessary type check on the module store. XML module stores will throw…

remove unnecessary type check on the module store. XML module stores will throw an exception when deleting an item...
parent e92799bb
...@@ -137,10 +137,6 @@ def delete_course(modulestore, contentstore, source_location, commit=False): ...@@ -137,10 +137,6 @@ def delete_course(modulestore, contentstore, source_location, commit=False):
courseware store. BE VERY CAREFUL, this is not reversable. courseware store. BE VERY CAREFUL, this is not reversable.
""" """
# first check to see if the modulestore is Mongo backed
if not isinstance(modulestore, MongoModuleStore):
raise Exception("Expected a MongoModuleStore in the runtime. Aborting....")
# check to see if the source course is actually there # check to see if the source course is actually there
if not modulestore.has_item(source_location): if not modulestore.has_item(source_location):
raise Exception("Cannot find a course at {0}. Aborting".format(source_location)) raise Exception("Cannot find a course at {0}. Aborting".format(source_location))
......
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