1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

- run_editor: use shlex.split instead of plain split in order to build a proper cmd for $EDITOR

This commit is contained in:
Marcus Huewe 2013-08-03 17:20:03 +02:00
parent 2dac43aecf
commit 0e30e56ded

View File

@ -21,6 +21,7 @@ import subprocess
import re
import socket
import errno
import shlex
try:
from urllib.parse import urlsplit, urlunsplit, urlparse, quote_plus, urlencode, unquote
@ -3480,7 +3481,7 @@ def run_pager(message, tmp_suffix=''):
def run_editor(filename):
editor = os.getenv('EDITOR', default=get_default_editor())
cmd = editor.split(' ')
cmd = shlex.split(editor)
cmd.append(filename)
return run_external(cmd[0], *cmd[1:])