The problem is that config variable always has attribute server, which means that db_server_port is always overwritten. I've encountered this issue when running pytest in main branch.
Suggestion:
- replace line 61 with
if hasattr(config, "server") and config.server is not None:
|
def setup_ssh_tunnel(config: CredentialsConfig) -> int: |
|
"""Set up SSH tunnel if needed and returns port number.""" |
|
if hasattr(config, "server"): # remote connection |
|
db.start_or_restart_ssh_connection_if_needed() |
|
config.db_server_port = db.ssh_tunnel_local_port |
|
return db.ssh_tunnel_local_port |
|
# local connection |
|
return config.db_server_port |
The problem is that
configvariable always has attributeserver, which means thatdb_server_portis always overwritten. I've encountered this issue when runningpytestin main branch.Suggestion:
if hasattr(config, "server") and config.server is not None:road-graph-tool/python/scripts/process_osm.py
Lines 59 to 66 in b783c98