From 2a39e012de12bd26112ec6c4a616e21b0257e556 Mon Sep 17 00:00:00 2001 From: omri Date: Fri, 15 Dec 2023 21:21:24 +0200 Subject: [PATCH] fzfsample: use errors="replace" on subprocess.getoutpu --- .config/scripts/util/fzfsample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/scripts/util/fzfsample b/.config/scripts/util/fzfsample index 137861b..2d242ce 100755 --- a/.config/scripts/util/fzfsample +++ b/.config/scripts/util/fzfsample @@ -16,7 +16,7 @@ parser.add_argument("-e", "--pattern", action="append", help="search for string" parser.add_argument("-r", "--random", action="store_true", help="random order for args") args = parser.parse_args() -files = subprocess.getoutput(r"fd \(wav\|mp3\)$ .").splitlines() +files = subprocess.getoutput(r"fd \(wav\|mp3\)$ .", errors="replace").splitlines() if args.random: random.shuffle(files)