Skip to content

Commit 4418a4f

Browse files
committed
Fix escaping in call to Rhino from CPython
1 parent 1a1a8c0 commit 4418a4f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ghpythonremote/connectors.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def _launch_rhino(self):
382382
assert self.rpyc_server_py is not "" and self.rpyc_server_py is not None
383383
assert self.port is not "" and self.port is not None
384384
rhino_call = [
385-
self.rhino_exe,
385+
'"' + self.rhino_exe + '"',
386386
"/nosplash",
387387
"/notemplate",
388388
'/runscript="-_RunPythonScript ""{!s}"" {!s} -_Exit "'.format(
@@ -391,6 +391,9 @@ def _launch_rhino(self):
391391
]
392392
if self.rhino_file_path:
393393
rhino_call.append(self.rhino_file_path)
394+
# Default escaping in subprocess.line2cmd does not work here,
395+
# manually convert to string
396+
rhino_call = " ".join(rhino_call)
394397
rhino_popen = subprocess.Popen(
395398
rhino_call, stdout=subprocess.PIPE, stdin=subprocess.PIPE
396399
)

0 commit comments

Comments
 (0)