Change-Id: I8a5d2174927120e2706eaba5bdee38f60d4a4a9d
Signed-off-by: Juan <jquiroga@whitestack.com>
master_key = config.get("commonkey") or config.get("masterpassword")
if master_key:
self.set_secret_key(master_key)
- self.client = MongoClient(config["host"], config["port"])
+ if config.get("url"):
+ self.client = MongoClient(config["url"])
+ else:
+ self.client = MongoClient(config["host"], config["port"])
# TODO add as parameters also username=config.get("user"), password=config.get("password"))
# when all modules are ready
self.db = self.client[config["name"]]