Skip to content

Commit

Permalink
[ADD] Carepoint: Add db_args
Browse files Browse the repository at this point in the history
* Add db_args attribute to allow pass-thru to DB
  • Loading branch information
lasley committed Jul 16, 2016
1 parent 355d8d9 commit 53dd040
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion carepoint/db/carepoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class Carepoint(dict):
'==': operator.eq,
}

def __init__(self, server, user, passwd, smb_user=None, smb_passwd=None):
def __init__(self, server, user, passwd, smb_user=None, smb_passwd=None,
db_args=None,
):

super(Carepoint, self).__init__()
self.iter_refresh = False
Expand All @@ -46,6 +48,8 @@ def __init__(self, server, user, passwd, smb_user=None, smb_passwd=None):
'server': server,
'db': 'cph',
}
if db_args is not None:
params.update(db_args)
# @TODO: Lazy load, once other dbs needed
self.dbs = {
'cph': Db(**params),
Expand Down

0 comments on commit 53dd040

Please sign in to comment.