Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1e20cdb

Browse files
author
vshepard
committed
Add StrictHostKeyChecking=no for ssh connect
1 parent9c251a4 commit1e20cdb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

‎testgres/operations/remote_ops.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
raiseImportError("You must have psycopg2 or pg8000 modules installed")
1515

1616
from ..exceptionsimportExecUtilException
17+
from ..utilsimportreserve_port
1718
from .os_opsimportOsOperations,ConnectionParams,get_default_encoding
1819

1920
error_markers= [b'error',b'Permission denied',b'fatal',b'No such file or directory']
@@ -383,7 +384,7 @@ def db_connect(self, dbname, user, password=None, host="localhost", port=5432):
383384
"""
384385
Established SSH tunnel and Connects to a PostgreSQL
385386
"""
386-
self.establish_ssh_tunnel(local_port=port,remote_port=5432)
387+
self.establish_ssh_tunnel(local_port=reserve_port(),remote_port=5432)
387388
try:
388389
conn=pglib.connect(
389390
host=host,

‎testgres/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ def execute_utility(args, logfile=None, verbose=False):
7474

7575
# write new log entry if possible
7676
iflogfile:
77+
ifnottconf.os_ops.path_exists(logfile):
78+
tconf.os_ops.touch(logfile)
7779
try:
7880
tconf.os_ops.write(filename=logfile,data=args,truncate=True)
7981
ifout:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp