mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Fixed #1528 by updating desired Mongo version to v2.6.4.
This commit is contained in:
parent
1bd1ca0ced
commit
211fca46f6
1 changed files with 3 additions and 3 deletions
|
@ -71,18 +71,18 @@ def which(cmd, mode=os.F_OK | os.X_OK, path=None):
|
|||
|
||||
|
||||
current_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
|
||||
allowedMongoVersions = ["v2.5.4","v2.5.5","v2.6.0"]
|
||||
allowedMongoVersions = ["v2.6.0","v2.6.4"]
|
||||
if which("mongod") and any(i in subprocess.check_output("mongod --version",shell=True) for i in allowedMongoVersions):
|
||||
mongo_executable = "mongod"
|
||||
else:
|
||||
mongo_executable = None
|
||||
print("Mongod 2.5.4 wasn't found. Searching in bin directory...")
|
||||
print("Mongod 2.6.4 wasn't found. Searching in bin directory...")
|
||||
|
||||
mongo_directory = current_directory + os.sep + u"mongo"
|
||||
if not mongo_executable:
|
||||
mongo_executable = os.environ.get("COCO_MONGOD_PATH",mongo_directory + os.sep + u"mongod")
|
||||
if not os.path.exists(mongo_executable):
|
||||
raise EnvironmentError("Mongo 2.5.4 executable not found.")
|
||||
raise EnvironmentError("Mongo 2.6.4 executable not found.")
|
||||
print("Using mongo executable: " + str(mongo_executable))
|
||||
mongo_db_path = os.path.abspath(os.path.join(current_directory,os.pardir)) + os.sep + u"mongo"
|
||||
if not os.path.exists(mongo_db_path):
|
||||
|
|
Loading…
Reference in a new issue