fzfsample: use errors="replace" on subprocess.getoutpu
This commit is contained in:
@ -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")
|
parser.add_argument("-r", "--random", action="store_true", help="random order for args")
|
||||||
args = parser.parse_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:
|
if args.random:
|
||||||
random.shuffle(files)
|
random.shuffle(files)
|
||||||
|
|||||||
Reference in New Issue
Block a user