aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/mongodb.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/mongodb.py b/source/mongodb.py
index b8ac0fd9..23a5b5ad 100644
--- a/source/mongodb.py
+++ b/source/mongodb.py
@@ -38,7 +38,8 @@ class Articles(object):
self.db_name = db_name
self.connection = pymongo.connection.Connection(url, port)
self.db = pymongo.database.Database(self.connection, self.db_name)
- self.db.authenticate(user, password)
+ if password != "":
+ self.db.authenticate(user, password)
collections = self.db.collection_names()
for collection_name in collections:
if collection_name != "system.indexes":
bgstack15