Passed kwargs to db_remove

The function db_remove fails because the call to the dbexists function needs kwargs to connect to the db if you're passing all connection parameters from cli.
This commit is contained in:
Giandom 2018-10-12 11:39:51 +02:00 committed by GitHub
parent 8949873b79
commit 04a99e07a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,7 +175,7 @@ def db_remove(database_name, **kwargs):
salt minion mssql.db_remove database_name='DBNAME'
'''
try:
if db_exists(database_name) and database_name not in ['master', 'model', 'msdb', 'tempdb']:
if db_exists(database_name, **kwargs) and database_name not in ['master', 'model', 'msdb', 'tempdb']:
conn = _get_connection(**kwargs)
conn.autocommit(True)
cur = conn.cursor()