Skip to content

Commit

Permalink
gui/applets: escape backslashes in {python} and {ipc_address}
Browse files Browse the repository at this point in the history
sbourdeauducq committed Feb 16, 2016
1 parent 6196aaf commit 2ce3c08
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions artiq/gui/applets.py
Original file line number Diff line number Diff line change
@@ -110,8 +110,10 @@ async def start(self):
if "{ipc_address}" not in self.command:
logger.warning("IPC address missing from command for %s",
self.applet_name)
command = self.command.format(python=sys.executable,
ipc_address=self.ipc.get_address())
command = self.command.format(
python=sys.executable.replace("\\", "\\\\"),
ipc_address=self.ipc.get_address().replace("\\", "\\\\")
)
logger.debug("starting command %s for %s", command, self.applet_name)
try:
await self.ipc.create_subprocess(*shlex.split(command))

0 comments on commit 2ce3c08

Please sign in to comment.