Commit 4cbb9253 by Chris Dodge

fix broken unit test

parent d7b148d0
...@@ -302,6 +302,7 @@ def import_module(module, store, course_data_path, static_content_store, allow_n ...@@ -302,6 +302,7 @@ def import_module(module, store, course_data_path, static_content_store, allow_n
# Ignore any missing keys in _model_data # Ignore any missing keys in _model_data
pass pass
module_data = {}
if 'data' in content: if 'data' in content:
module_data = content['data'] module_data = content['data']
...@@ -324,8 +325,10 @@ def import_module(module, store, course_data_path, static_content_store, allow_n ...@@ -324,8 +325,10 @@ def import_module(module, store, course_data_path, static_content_store, allow_n
for key in remap_dict.keys(): for key in remap_dict.keys():
module_data = module_data.replace(key, remap_dict[key]) module_data = module_data.replace(key, remap_dict[key])
except Exception, e: except Exception:
logging.exception("failed to rewrite links on {0}. Continuing...".format(module.location)) logging.exception("failed to rewrite links on {0}. Continuing...".format(module.location))
else:
module_data = content
if allow_not_found: if allow_not_found:
store.update_item(module.location, module_data, allow_not_found=allow_not_found) store.update_item(module.location, module_data, allow_not_found=allow_not_found)
......
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