Add support for SSH tunneled connections. Fixes #1447

This commit is contained in:
Akshay Joshi
2018-05-04 11:27:27 +01:00
committed by Dave Page
parent 455c45ea85
commit b7fb01ab04
26 changed files with 697 additions and 129 deletions

View File

@@ -25,7 +25,7 @@ from pgadmin.tools.sqleditor.utils.update_session_grid_transaction import \
update_session_grid_transaction
from pgadmin.utils.ajax import make_json_response, internal_server_error
from pgadmin.utils.driver import get_driver
from pgadmin.utils.exception import ConnectionLost
from pgadmin.utils.exception import ConnectionLost, SSHTunnelConnectionLost
class StartRunningQuery:
@@ -61,7 +61,7 @@ class StartRunningQuery:
auto_reconnect=False,
use_binary_placeholder=True,
array_to_string=True)
except ConnectionLost:
except (ConnectionLost, SSHTunnelConnectionLost):
raise
except Exception as e:
self.logger.error(e)
@@ -127,7 +127,7 @@ class StartRunningQuery:
# and formatted_error is True.
try:
status, result = conn.execute_async(sql)
except ConnectionLost:
except (ConnectionLost, SSHTunnelConnectionLost):
raise
# If the transaction aborted for some reason and