Skip to content
Snippets Groups Projects
Commit abffb225 authored by Stefano Zacchiroli's avatar Stefano Zacchiroli
Browse files

cli.py: prefer os.fsdecode() over manual fiddling with locale.getpref...

parent 89f8d114
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,6 @@
# See top-level LICENSE file for more information
import click
import locale
import os
import sys
......@@ -107,8 +106,7 @@ def identify(obj_type, verify, show_filename, objects):
for (obj, pid) in results:
msg = pid
if show_filename:
encoding = locale.getpreferredencoding(do_setlocale=False)
msg = '%s\t%s' % (pid, obj.decode(encoding))
msg = '%s\t%s' % (pid, os.fsdecode(obj))
click.echo(msg)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment