mirror of
https://github.com/beetbox/beets.git
synced 2025-12-14 04:23:56 +01:00
Prevent shlex.split from returning strange encodings
This commit is contained in:
parent
132f5ba912
commit
f263935a51
1 changed files with 2 additions and 2 deletions
|
|
@ -1494,9 +1494,9 @@ def config_edit():
|
|||
path = config.user_config_path()
|
||||
|
||||
if 'EDITOR' in os.environ:
|
||||
editor = os.environ['EDITOR']
|
||||
editor = os.environ['EDITOR'].encode('utf8')
|
||||
try:
|
||||
editor = shlex.split(editor)
|
||||
editor = [e.decode('utf8') for e in shlex.split(editor)]
|
||||
except ValueError: # Malformed shell tokens.
|
||||
editor = [editor]
|
||||
args = editor + [path]
|
||||
|
|
|
|||
Loading…
Reference in a new issue