Commit 726e8419 authored by Francisco Arcila Salamanca's avatar Francisco Arcila Salamanca
Browse files

add elif statement for listed connection

parent 9f655a29
......@@ -94,7 +94,12 @@ def connect(conf_db: Union[dict, str], database: str = "", ssh_group: str = None
server.start()
config[conf_db]["host"] = "127.0.0.1"
config[conf_db]["port"] = server.local_bind_port
return server, MySQLdb.connect(**config[conf_db])
db = MySQLdb.connect(**config[conf_db])
db = db[1] if type(db) in [list, tuple] else db
return server, db
def get_config(config_file="config"):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment