Show More
@@ -6,7 +6,6 b' Contributions are *very* welcome.' | |||||
6 | """ |
|
6 | """ | |
7 |
|
7 | |||
8 | import os |
|
8 | import os | |
9 | import pipes |
|
|||
10 | import shlex |
|
9 | import shlex | |
11 | import subprocess |
|
10 | import subprocess | |
12 | import sys |
|
11 | import sys | |
@@ -47,9 +46,9 b' def install_editor(template, wait=False):' | |||||
47 | def call_editor(self, filename, line=0): |
|
46 | def call_editor(self, filename, line=0): | |
48 | if line is None: |
|
47 | if line is None: | |
49 | line = 0 |
|
48 | line = 0 | |
50 |
cmd = template.format(filename= |
|
49 | cmd = template.format(filename=shlex.quote(filename), line=line) | |
51 | print(">", cmd) |
|
50 | print(">", cmd) | |
52 |
# |
|
51 | # shlex.quote doesn't work right on Windows, but it does after splitting | |
53 | if sys.platform.startswith('win'): |
|
52 | if sys.platform.startswith('win'): | |
54 | cmd = shlex.split(cmd) |
|
53 | cmd = shlex.split(cmd) | |
55 | proc = subprocess.Popen(cmd, shell=True) |
|
54 | proc = subprocess.Popen(cmd, shell=True) |
General Comments 0
You need to be logged in to leave comments.
Login now