Commit e9247920 by Bridger Maxwell

Moved potential failure outside of unrelated try/catch block that would have…

Moved potential failure outside of unrelated try/catch block that would have masked the missing settings.DATA_DIR
parent f987f99a
......@@ -34,12 +34,15 @@ class Settings(object):
if setting == setting.upper():
setattr(self, setting, getattr(global_course_settings, setting))
data_dir = settings.DATA_DIR
fp = None
try:
fp, pathname, description = imp.find_module("course_settings", [settings.DATA_DIR])
fp, pathname, description = imp.find_module("course_settings", [data_dir])
mod = imp.load_module("course_settings", fp, pathname, description)
except Exception as e:
_log.error("Unable to import course settings file from " + settings.DATA_DIR + ". Error: " + str(e))
_log.exception("Unable to import course settings file from " + data_dir + ". Error: " + str(e))
mod = types.ModuleType('course_settings')
finally:
if fp:
......
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