Fixes parsing config using bracketed section name
parent
4a0ab2187f
commit
0a5f9491a1
|
@ -16,7 +16,7 @@ def connection_from_dsn_section(section, config):
|
|||
return str(URL(**cfg_dict))
|
||||
|
||||
|
||||
def _connection_string(s):
|
||||
def _connection_string(s, config):
|
||||
|
||||
s = expandvars(s) # for environment variables
|
||||
if "@" in s or "://" in s:
|
||||
|
@ -46,7 +46,7 @@ def parse(cell, config):
|
|||
pieces = cell.split(None, 3)
|
||||
if not pieces:
|
||||
return result
|
||||
result["connection"] = _connection_string(pieces[0])
|
||||
result["connection"] = _connection_string(pieces[0], config)
|
||||
if result["connection"]:
|
||||
pieces.pop(0)
|
||||
if len(pieces) > 1 and pieces[1] == "<<":
|
||||
|
|
Loading…
Reference in New Issue