diff options
author | Koren Lev <korenlev@gmail.com> | 2017-08-01 11:42:22 +0300 |
---|---|---|
committer | Koren Lev <korenlev@gmail.com> | 2017-08-01 11:42:22 +0300 |
commit | 06291662431a1b4cdc71397e13459b126d1db585 (patch) | |
tree | 58811f9ca0bed45c4468c4c16f6c5c87e5d13b98 /app/utils | |
parent | 6525cff29fcdb2a6e6533cb467755dc95126e4d6 (diff) |
change password to pwd + add missing mongo credentials log message
Change-Id: Id55a52742b396783ef7c8844db0ef3e10aba65f2
Signed-off-by: Koren Lev <korenlev@gmail.com>
Diffstat (limited to 'app/utils')
-rw-r--r-- | app/utils/mongo_access.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/utils/mongo_access.py b/app/utils/mongo_access.py index 1425017..6277ace 100644 --- a/app/utils/mongo_access.py +++ b/app/utils/mongo_access.py @@ -94,11 +94,13 @@ class MongoAccess(DictNamingConverter): def prepare_connect_uri(self): params = self.connect_params - self.log.debug('connecting to MongoDb server: {}' + self.log.debug('connecting to MongoDB server: {}' .format(params['server'])) uri = 'mongodb://' - if 'password' in params: - uri = uri + params['user'] + ':' + params['password'] + '@' + if 'pwd' in params: + uri = uri + params['user'] + ':' + params['pwd'] + '@' + else: + self.log.info('MongoDB credentials missing') uri = uri + params['server'] if 'auth_db' in params: uri = uri + '/' + params['auth_db'] |