summaryrefslogtreecommitdiff
path: root/kpov_judge/add_task.py
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/add_task.py')
-rwxr-xr-xkpov_judge/add_task.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/kpov_judge/add_task.py b/kpov_judge/add_task.py
index 8294a33..76eb2ae 100755
--- a/kpov_judge/add_task.py
+++ b/kpov_judge/add_task.py
@@ -43,12 +43,8 @@ if __name__ == '__main__':
class_id = os.path.split(os.path.dirname(normpath))[-1]
task_id = os.path.basename(normpath)
print((class_id, task_id))
- db = pymongo.MongoClient(settings.DB_HOST).kpov
- try:
- db.authenticate(settings.USERNAME, settings.PASSWORD)
- except Exception as e:
- print("Not authenticated:"+str(e))
- #no auth or auth config?
+
+ db = pymongo.MongoClient(settings.DB_URI).get_default_database()
source = open(fname).read()
d = {}