Skip to content
Snippets Groups Projects
Commit 916307df authored by Eric Herrera's avatar Eric Herrera
Browse files

Update exception name due to breaking changes introduced in mongoengine 0.19.0.

parent dcf9a338
Branches
Tags
No related merge requests found
......@@ -335,7 +335,7 @@ def add_repo(repo, rdir_in, branch=None):
mdb = mongoengine.connect(mongo_db['db'], host=mongouri)
else:
mdb = mongoengine.connect(mongo_db['db'], host=mongo_db['host'], port=mongo_db['port'])
except mongoengine.connection.ConnectionError:
except mongoengine.connection.ConnectionFailure:
log.exception('Unable to connect to mongodb to save log, please '
'check MONGODB_LOG settings')
cil = CourseImportLog(
......
......@@ -128,7 +128,7 @@ class TestSysAdminMongoCourseImport(SysadminBaseTestCase):
try:
mongoengine.connect(TEST_MONGODB_LOG['db'])
CourseImportLog.objects.all().delete()
except mongoengine.connection.ConnectionError:
except mongoengine.connection.ConnectionFailure:
pass
def _setstaff_login(self):
......
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