From 6a609c1b07cc6759cc505df5dee3f48ec3dbe636 Mon Sep 17 00:00:00 2001 From: TapTap Date: Sun, 5 Jul 2026 18:42:35 +0200 Subject: [PATCH] test: add text=True to rsync subprocess.run Without text=True, stderr is bytes, and bytes.split('\n') throws TypeError: a bytes-like object is required, not 'str'. --- test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.py b/test.py index 68041d0..bbd8578 100755 --- a/test.py +++ b/test.py @@ -322,7 +322,7 @@ path = {source_dir} start_time = time.monotonic() rsync_result = subprocess.run( - rsync_cmd, capture_output=True, timeout=120 + rsync_cmd, capture_output=True, text=True, timeout=120 ) end_time = time.monotonic() duration = end_time - start_time