mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 22:13:32 -04:00
Fix for "Type str doesn't support the buffer API"
subprocess.check_output("mongod --version",shell=True) returns a byte string so to convert it to a regular string we should do this : mongo_version_string = subprocess.check_output("mongod --version",shell=True) mongo_version_string = mongo_version_string.decode(encoding='UTF-8')
This commit is contained in:
parent
312d880508
commit
673b5ff04e
1 changed files with 1 additions and 0 deletions
|
@ -36,6 +36,7 @@ class SetupFactory(object):
|
|||
mongo_version_string = ""
|
||||
try:
|
||||
mongo_version_string = subprocess.check_output("mongod --version",shell=True)
|
||||
mongo_version_string = mongo_version_string.decode(encoding='UTF-8')
|
||||
except:
|
||||
print("Mongod not found.")
|
||||
if "v2.5.4" not in mongo_version_string:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue