diff options
-rwxr-xr-x | kpov_judge/add_task.py | 2 | ||||
-rw-r--r-- | kpov_judge/create_opstack.py | 2 | ||||
-rw-r--r-- | kpov_judge/finalize_opstack.py | 2 | ||||
-rwxr-xr-x | kpov_judge/rm_task.py | 2 | ||||
-rw-r--r-- | kpov_judge/util.py | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/kpov_judge/add_task.py b/kpov_judge/add_task.py index dc7a608..9ba49f3 100755 --- a/kpov_judge/add_task.py +++ b/kpov_judge/add_task.py @@ -38,7 +38,7 @@ if __name__ == '__main__': task_id = sys.argv[2] except: task_id = os.path.basename(os.path.normpath(dirname)) - db = pymongo.Connection(settings.DB_HOST).kpov + db = pymongo.MongoClient(settings.DB_HOST).kpov try: db.authenticate(settings.USERNAME, settings.PASSWORD) except Exception, e: diff --git a/kpov_judge/create_opstack.py b/kpov_judge/create_opstack.py index dfa5311..4b3742a 100644 --- a/kpov_judge/create_opstack.py +++ b/kpov_judge/create_opstack.py @@ -32,7 +32,7 @@ def main(): admin_role = kc.roles.find(name='admin') member_role = kc.roles.find(name='Member') - db = pymongo.Connection(settings.DB_HOST).kpov + db = pymongo.MongoClient(settings.DB_HOST).kpov try: db.authenticate(settings.USERNAME, settings.PASSWORD) except Exception, e: diff --git a/kpov_judge/finalize_opstack.py b/kpov_judge/finalize_opstack.py index f09ac5e..7938bda 100644 --- a/kpov_judge/finalize_opstack.py +++ b/kpov_judge/finalize_opstack.py @@ -38,7 +38,7 @@ def get_quantum_client(tenant_name): kc = ksclient.Client(endpoint=settings.OS_ADMIN_AUTH_URL, token=settings.OS_ADMIN_TOKEN) member_role = kc.roles.find(name='Member') -db = pymongo.Connection(settings.DB_HOST).kpov +db = pymongo.MongoClient(settings.DB_HOST).kpov try: db.authenticate(settings.USERNAME, settings.PASSWORD) except Exception, e: diff --git a/kpov_judge/rm_task.py b/kpov_judge/rm_task.py index e724d68..ebdadc6 100755 --- a/kpov_judge/rm_task.py +++ b/kpov_judge/rm_task.py @@ -17,7 +17,7 @@ if __name__ == '__main__': print u"Usage: {0} [task_name]".format(sys.argv[0]) exit(1) task_id = sys.argv[1] - db = pymongo.Connection(settings.DB_HOST).kpov + db = pymongo.MongoClient(settings.DB_HOST).kpov try: db.authenticate(settings.USERNAME, settings.PASSWORD) except Exception, e: diff --git a/kpov_judge/util.py b/kpov_judge/util.py index bdcc690..66e2707 100644 --- a/kpov_judge/util.py +++ b/kpov_judge/util.py @@ -7,4 +7,4 @@ def write_default_config(disk, params): 'task_url']: if k in params: default_params[k] = params[k] - disk.write(yaml.dump(default_params)) + disk.write('/home/tester/.kpov_params.yaml', yaml.dump(default_params)) |