Skip to content

Commit

Permalink
Fix subprocess invocation per suggestion from @wjwwood
Browse files Browse the repository at this point in the history
  • Loading branch information
scpeters committed Apr 28, 2014
1 parent e114c9d commit 948eb7d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/catkin/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ def isolation_print_command(cmd, path=None, add_env=None):

def get_multiarch(build_dir):
# this function returns the suffix for lib directories on supported systems or an empty string
return run_command('dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null', build_dir, quiet=True)
out, err = subprocess.Popen(
['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).communicate()

This comment has been minimized.

Copy link
@wjwwood

wjwwood Apr 28, 2014

You'll also want to handle the case where dpkg-architecture doesn't exist.

return out


def get_python_install_dir():
# this function returns the same value as the CMake variable PYTHON_INSTALL_DIR from catkin/cmake/python.cmake
Expand Down

0 comments on commit 948eb7d

Please sign in to comment.