fzfsample: use errors="replace" on subprocess.getoutpu

This commit is contained in:
2023-12-15 21:21:24 +02:00
parent 07e1a6fc74
commit 2a39e012de

View File

@ -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)