Skip to content

Commit 31c7bce

Browse files
[BUG FIX] Wrappers for psql use subprocess.PIPE for stdout and stderr
It fixes a problem with Windows.
1 parent 5bb1510 commit 31c7bce

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
import signal
66
import threading
77
import tempfile
8+
import subprocess
89
from queue import Queue
910

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

1052-
return self.os_ops.exec_command(psql_params, verbose=True, input=input, ignore_errors=ignore_errors)
1053+
return self.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
def safe_psql(self, query=None, expect_error=False, **kwargs):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy