Skip to content

Commit

Permalink
another attempt to fix launch command support for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
seanyen committed Sep 29, 2018
1 parent db82e14 commit eeb90da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/roslaunch/src/roslaunch/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,9 @@ def param_value(self, verbose, name, ptype, value, textfile, binfile, command):
print("... executing command param [%s]" % command)
import subprocess, shlex #shlex rocks
try:
os_posix = os.name == "posix"
p = subprocess.Popen(shlex.split(command, posix=os_posix), stdout=subprocess.PIPE)
if os.name == "posix":
command = shlex.split(command)
p = subprocess.Popen(command, stdout=subprocess.PIPE)
c_value = p.communicate()[0]
if not isinstance(c_value, str):
c_value = c_value.decode('utf-8')
Expand Down

0 comments on commit eeb90da

Please sign in to comment.