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

Commit2679646

Browse files
[BUG FIX] Part for RemoteOps changes...
1 parent28c91c2 commit2679646

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎testgres/operations/remote_ops.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
importplatform
44
importsubprocess
55
importtempfile
6+
importio
67

78
# we support both pg8000 and psycopg2
89
try:
@@ -341,7 +342,9 @@ def _read__text_with_encoding(self, filename, encoding):
341342
asserttype(encoding)==str# noqa: E721
342343
content=self._read__binary(filename)
343344
asserttype(content)==bytes# noqa: E721
344-
content_s=content.decode(encoding)
345+
buf0=io.BytesIO(content)
346+
buf1=io.TextIOWrapper(buf0,encoding=encoding)
347+
content_s=buf1.read()
345348
asserttype(content_s)==str# noqa: E721
346349
returncontent_s
347350

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp