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

Commit31c7bce

Browse files
[BUG FIX] Wrappers for psql use subprocess.PIPE for stdout and stderr
It fixes a problem with Windows.
1 parent5bb1510 commit31c7bce

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎testgres/node.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
importsignal
66
importthreading
77
importtempfile
8+
importsubprocess
89
fromqueueimportQueue
910

1011
importtime
@@ -1049,7 +1050,13 @@ def _psql(
10491050
# should be the last one
10501051
psql_params.append(dbname)
10511052

1052-
returnself.os_ops.exec_command(psql_params,verbose=True,input=input,ignore_errors=ignore_errors)
1053+
returnself.os_ops.exec_command(
1054+
psql_params,
1055+
verbose=True,
1056+
input=input,
1057+
stderr=subprocess.PIPE,
1058+
stdout=subprocess.PIPE,
1059+
ignore_errors=ignore_errors)
10531060

10541061
@method_decorator(positional_args_hack(['dbname','query']))
10551062
defsafe_psql(self,query=None,expect_error=False,**kwargs):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp