diff options
author | cedricbonhomme <devnull@localhost> | 2013-04-03 08:56:38 +0200 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2013-04-03 08:56:38 +0200 |
commit | 522237820cc15a6b6ca98abdbff090889ea158a1 (patch) | |
tree | fb2f936e56b15e57e7827be2b69570f81d1ce437 /source | |
parent | THe code for the QR Code generation is now in utils.py. (diff) | |
download | newspipe-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.
Diffstat (limited to 'source')
-rw-r--r-- | source/mongodb.py | 3 |
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": |