aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2013-04-03 08:56:38 +0200
committercedricbonhomme <devnull@localhost>2013-04-03 08:56:38 +0200
commit522237820cc15a6b6ca98abdbff090889ea158a1 (patch)
treefb2f936e56b15e57e7827be2b69570f81d1ce437
parentTHe code for the QR Code generation is now in utils.py. (diff)
downloadnewspipe-522237820cc15a6b6ca98abdbff090889ea158a1.tar.gz
newspipe-522237820cc15a6b6ca98abdbff090889ea158a1.tar.bz2
newspipe-522237820cc15a6b6ca98abdbff090889ea158a1.zip
Don't try to authenticate is no password is given by the user in the configuration file.
-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