]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
refactor: use text mode for subprocess in async_to_sync.py
authorDenis Laxalde <denis.laxalde@dalibo.com>
Fri, 13 Oct 2023 06:51:54 +0000 (08:51 +0200)
committerDenis Laxalde <denis.laxalde@dalibo.com>
Fri, 13 Oct 2023 07:57:05 +0000 (09:57 +0200)
tools/async_to_sync.py

index 0bb9871dba6d65e3026a5b453ae8df7ad13d1b92..0e450b278e9bc8cea658b5c4223d9856cff195a2 100755 (executable)
@@ -104,7 +104,7 @@ def check(outputs: list[str]) -> int:
 
     # Check that all the files to convert are included in the --all list
     cmdline = ["git", "grep", "-l", f"auto-generated by '{SCRIPT_NAME}'", "**.py"]
-    maybe_conv = sp.check_output(cmdline, cwd=str(PROJECT_DIR)).decode().split()
+    maybe_conv = sp.check_output(cmdline, cwd=str(PROJECT_DIR), text=True).split()
     if not maybe_conv:
         logger.error("no file to check? Maybe this script bitrot?")
         return 1